Jump to content

Help with server hook needed


Recommended Posts

Posted

With trying to transfer my scripts over from Ascent, I've having an issue with my script that teaches all class spells and skills.


     void AddSC_oncreate()

     {

             mgr->register_hook(SERVER_HOOK_EVENT_ON_FIRST_ENTER_WORLD, (void*)PlayerFirstEnter);
     }

1>oncreate.cpp

1>..\\scripts\\custom\\oncreate.cpp(351) : error C2065: 'mgr' : undeclared identifier

1>..\\scripts\\custom\\oncreate.cpp(351) : error C2227: left of '->register_hook' must point to class/struct/union/generic type

1> type is ''unknown-type''

1>..\\scripts\\custom\\oncreate.cpp(351) : error C2065: 'SERVER_HOOK_EVENT_ON_FIRST_ENTER_WORLD' : undeclared identifier

Posted
Yeah this is on enter world from creation. The script teaches all class spells, racials, adds item sets etc. does away with playercreate info stuff in sql.
I think you can do all those things in the DB, you don't need to write a script for it ..
Posted

Like he said, you can do all that in the database.

Ascent's scripting system is much more advanced than the one in hooks, but lacking in other areas. Most of the stuff you can do on there you can do on here.

Posted

Yeah I'm aware you can do it via database, BUT it is a lot faster for me via my script case Rogue: pushitemset=654 rather then having to put 8 lines of sql per class/race, same with spells and skills.

Also some of the things my script did that a database can't do is put them into a beginner guild, start them with private or grunt, teach all flight paths and explore all maps just to name a few.

Please consider this hook for future builds =)

  • 3 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use