DragoN Auto Systems Addon

Status
Not open for further replies.
Joined
Jul 24, 2008
Messages
666
Reaction score
460
Hello
This is my second addon , hope you enjoy it :D:
what it include ?
Advanced config For
auto event, snow, declare, notice, Cw messages for start / end and rewards after cw for castle owner guild
you can add multiple events , snows or notices
unilimited items for castle war rewards

also it include rewards at level up addon
but this time you can add more state points or skill points as a reward in any level
you can false or true rewards at level up addon from auto-systems.cfg file

There is a menu to reload config, so you can make your changes in config files and reload it without restart mainsvrt

Notes
after you start load dll you will get an item with IID 1 , 2 and -2147483646
you have to not worry, this is important step to skip any double IID for castle war rewards

Important !!
Dont use maxiid stored procedure and if you using it you have to make IID > 1
when you write the day for events it should be like : Sat / Sun , etc...

After 2 minuts of cw_end time , congratulation message will appear
After 3 minuts of cw_end time , Rewards will send to members of castle owner guild


rewards.txt / auto-systems.cfg in mainsvrt folder and the dll can load with Library or with obsidin
i am not sure if this addon stable :)

report on any bugs or errors :)


 
Last edited:
Code:
BOOL __stdcall DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
  HANDLE v4; // eax@3
  HANDLE v5; // eax@4


  if ( fdwReason )
  {
    if ( fdwReason == 1 )
    {
      DetourTransactionBegin();
      v4 = GetCurrentThread();
      sub_1002B2C0(v4);
      beginthread(SQLSetup, 0, 0);
      beginthread(ThreadWithSleep1k, 0, 0);
      DetourAttach(&Server__Menu, Dragon__Server__Menu);
      DetourAttach(&CPlayerObject__OnTimer, Dragon__CPlayerObject__OnTimer);
// Dangerous Sleep(1000u)  in there
      DetourAttach(&CPlayer__LevelUp, Dragon__CPlayer__LevelUp);
      DetourTransactionCommit();
      return 1;
    }
  }
  else
  {
    DetourTransactionBegin();
    v5 = GetCurrentThread();
    sub_1002B2C0(v5);
    DetourTransactionCommit();
  }
  return 1;
}

You do some little risky things :P
First of all you did not Detach your Functions (DetourDetach), so you will not have an clean Server Close without this.
Second thing is you made a Sleep in CPlayerObject__OnTimer!
1000B6D0 push 1000
1000B6D5 call Sleep

I think the CPlayerObject__OnTimer is now reduced by its half.
And why do you start 2 Threads in DLL Attach when you want to use OnTimer instead of Threads?
The SQL Statments can be done i one single function without Thread.

I could help if you would show me the code ^^
 
Code:
BOOL __stdcall DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
  HANDLE v4; // eax@3
  HANDLE v5; // eax@4


  if ( fdwReason )
  {
    if ( fdwReason == 1 )
    {
      DetourTransactionBegin();
      v4 = GetCurrentThread();
      sub_1002B2C0(v4);
      beginthread(SQLSetup, 0, 0);
      beginthread(ThreadWithSleep1k, 0, 0);
      DetourAttach(&Server__Menu, Dragon__Server__Menu);
      DetourAttach(&CPlayerObject__OnTimer, Dragon__CPlayerObject__OnTimer);
// Dangerous Sleep(1000u)  in there
      DetourAttach(&CPlayer__LevelUp, Dragon__CPlayer__LevelUp);
      DetourTransactionCommit();
      return 1;
    }
  }
  else
  {
    DetourTransactionBegin();
    v5 = GetCurrentThread();
    sub_1002B2C0(v5);
    DetourTransactionCommit();
  }
  return 1;
}

You do some little risky things :P
First of all you did not Detach your Functions (DetourDetach), so you will not have an clean Server Close without this.
Second thing is you made a Sleep in CPlayerObject__OnTimer!
1000B6D0 push 1000
1000B6D5 call Sleep

I think the CPlayerObject__OnTimer is now reduced by its half.
And why do you start 2 Threads in DLL Attach when you want to use OnTimer instead of Threads?
The SQL Statments can be done i one single function without Thread.

I could help if you would show me the code ^^

thx for info
about Detach , i forgot to add it :P
about Sleep , i was using it while testing codes in normal console application :) so i forgot to remove it too

waiting another notes and reports on addon to fix ever things in next update :)
 
nice relase how i can make 2 or 3 events each day?

also can you make a realtime bof and realtime imp ?
 
Last edited:
nice relase how i can make 2 or 3 events each day?

also can you make a realtime bof and realtime imp ?

<event> [start_msg 'Double Exp Event Started 1'] [end_msg 'Double Exp Event Ended 1'] [day Daily] [start 02:00] [end 04:00] </event>
<event> [start_msg 'Double Exp Event Started 2'] [end_msg 'Double Exp Event Ended 2'] [day Daily] [start 06:00] [end 08:00] </event>
<event> [start_msg 'Double Exp Event Started 3'] [end_msg 'Double Exp Event Ended 3'] [day Daily] [start 10:00] [end 12:00] </event>

i already almost finish realtime bof , imp , mix , dss
 
<event> [start_msg 'Double Exp Event Started 1'] [end_msg 'Double Exp Event Ended 1'] [day Daily] [start 02:00] [end 04:00] </event>
<event> [start_msg 'Double Exp Event Started 2'] [end_msg 'Double Exp Event Ended 2'] [day Daily] [start 06:00] [end 08:00] </event>
<event> [start_msg 'Double Exp Event Started 3'] [end_msg 'Double Exp Event Ended 3'] [day Daily] [start 10:00] [end 12:00] </event>

i already almost finish realtime bof , imp , mix , dss

Do you will relase RealTime bof , imp , dss??
 
when i load it with libary it loads but after loading i get mainsvr crash
anyone have the same problem ?

greetz
 
how i increase snow min-max attack

thank you dragon for release :)

would be good if u make double event attack same as hidden kal ;)
thank you.
 
Last edited:
good job ;) , but what about this screen and what is it's important , and i also found that if i close this black one , the mainservt will close , and i can't close the mainservt by my self ;)
 

Attachments

  • f1system - DragoN Auto Systems Addon - RaGEZONE Forums
    f1system.webp
    73.9 KB · Views: 141
good job ;) , but what about this screen and what is it's important , and i also found that if i close this black one , the mainservt will close , and i can't close the mainservt by my self ;)

this console application not by my addon
about the red error , there is something wrong in config file or rewards.txt, you have to recheck on everything again and be sure that everything correct,
this message appeared to skip any crash in mainsvrt
 
this console application not by my addon
about the red error , there is something wrong in config file or rewards.txt, you have to recheck on everything again and be sure that everything correct,
this message appeared to skip any crash in mainsvrt

how come , i just took copy and paste , check them please ...
 
Status
Not open for further replies.
Back