Event Manager

Kubix

New member
Messages
150
Points
0
Location
Ukraine
Github
kubixservice
Emulator
Hey!
This is Event Manager, that helps you create new events.

I add new script command for test:D

Works like debugmes.

dbc41b4a227d10f1ab35cdb543505a20.png

  1. statusmes "message";

You can look in Return.c file, here you can find functions that helps you work with new Events.

I convert 2 standart events (RFYL & Bomb Poring).

  1. For start event, use - @startevent <event name>
  2. For check event settings use - @checkevent <event name>
  3. For join - @joinevent
  4. Leave - @leaveevent
  5. For get prize - @event
For add new event:
First goto Event_DB.c and add your event settings

Then add your event script to /Events/ folder
default_smile.png


Also I can help you convert your scripts.
Have questions? feel free to ask
default_smile.png

 

 
 
getting this

Code:
  parse_callfunc: not enough arguments, expected ','
    44:         {
    45:                 if( Event_Win_IDs[ .@i ] != 0 )
    46:                 {
*   47:                         getitem return_Event_Prize( Event_Win_IDs[.@i] ), return_Event_Amount( Event_Win_IDs[.@i] );
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    48:                         deletearray Event_Win_IDs[.@i], 1;
    49:                 }
    50:         }

 
 
 
getting this

 parse_callfunc: not enough arguments, expected ','
    44:         {
    45:                 if( Event_Win_IDs[ .@i ] != 0 )
    46:                 {
*   47:                         getitem return_Event_Prize( Event_Win_IDs[.@i] ), return_Event_Amount( Event_Win_IDs[.@i] );
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    48:                         deletearray Event_Win_IDs[.@i], 1;
    49:                 }
    50:         }

 
You must upload Return.c before all other scripts.

scripts_custom.conf:

npc: npc/custom/Event_Manager/Return.c

npc: npc/custom/Event_Manager/all other event manager's scripts.

 
@@Kubix

I have encounter errors on latest Hercules Git Hash 93a2c73.

I'm not sure if this error is the functions. Although i added them correctly.

I priority the 'Return.c' before load other scripts.

Script:

W9JgUtJ.png


Map Console:

WkKUOK9.png


PS: don't mind with the [WARNING] its not part of your script.

 
Last edited by a moderator:
npc: npc/kubix_scripts/EventManager/Return.c
npc: npc/kubix_scripts/EventManager/Debug.c
npc: npc/kubix_scripts/EventManager/Main.c
npc: npc/kubix_scripts/EventManager/Winner.c
npc: npc/kubix_scripts/EventManager/Add_Event.c
npc: npc/kubix_scripts/EventManager/Event_DB.c
npc: npc/kubix_scripts/EventManager/Mapflags.c
npc: npc/kubix_scripts/EventManager/Events/RFYL.c
npc: npc/kubix_scripts/EventManager/Events/BOMB.c
npc: npc/kubix_scripts/EventManager/Events/DICE.c
 
this is my

 
npc: npc/kubix_scripts/EventManager/Return.c
npc: npc/kubix_scripts/EventManager/Debug.c
npc: npc/kubix_scripts/EventManager/Main.c
npc: npc/kubix_scripts/EventManager/Winner.c
npc: npc/kubix_scripts/EventManager/Add_Event.c
npc: npc/kubix_scripts/EventManager/Event_DB.c
npc: npc/kubix_scripts/EventManager/Mapflags.c
npc: npc/kubix_scripts/EventManager/Events/RFYL.c
npc: npc/kubix_scripts/EventManager/Events/BOMB.c
npc: npc/kubix_scripts/EventManager/Events/DICE.c
 this is my
Its weird. But let me re-try again.

Thank you.

 
@@Kubix

I have encounter errors on latest Hercules Git Hash 93a2c73.

I'm not sure if this error is the functions. Although i added them correctly.

I priority the 'Return.c' before load other scripts.

Script:

W9JgUtJ.png


Map Console:

WkKUOK9.png


PS: don't mind with the [WARNING] its not part of your script.
I believe those ".c" files located in NPC folder should be in ".txt", and before loading those scripts don't forget to add the "statusmes.c" in plugins folder.

 
@@Kubix

I have encounter errors on latest Hercules Git Hash 93a2c73.

I'm not sure if this error is the functions. Although i added them correctly.

I priority the 'Return.c' before load other scripts.

Script:

W9JgUtJ.png


Map Console:

WkKUOK9.png


PS: don't mind with the [WARNING] its not part of your script.
I believe those ".c" files located in NPC folder should be in ".txt", and before loading those scripts don't forget to add the "statusmes.c" in plugins folder.
Statusmes is in debug.c as you can see it. And also i added it manually in src/ instead of plugin.Maybe i should re arranged the format
default_biggrin.png


 
Last edited by a moderator:
Hi, 

I have install plugins. I have one error when i start my server: 

865805error3.png


My script_custom.conf : 

// Event Manager
"npc/custom/heroes/event-manager/Return.c",
"npc/custom/heroes/event-manager/Add_Event.c",
"npc/custom/heroes/event-manager/Debug.c",
"npc/custom/heroes/event-manager/Event_DB.c",
"npc/custom/heroes/event-manager/Main.c",
"npc/custom/heroes/event-manager/Mapflags.c",
 
 
"npc/custom/heroes/event-manager/Winner.c",
"npc/custom/heroes/event-manager/Events/BOMB.c",
"npc/custom/heroes/event-manager/Events/RFYL.c",

An idea ?

Thank's in advance
 
Last edited by a moderator:
Hi, 

I have install plugins. I have one error when i start my server: 

865805error3.png


My script_custom.conf : 

// Event Manager
"npc/custom/heroes/event-manager/Return.c",
"npc/custom/heroes/event-manager/Add_Event.c",
"npc/custom/heroes/event-manager/Debug.c",
"npc/custom/heroes/event-manager/Event_DB.c",
"npc/custom/heroes/event-manager/Main.c",
"npc/custom/heroes/event-manager/Mapflags.c",
 
 
"npc/custom/heroes/event-manager/Winner.c",
"npc/custom/heroes/event-manager/Events/BOMB.c",
"npc/custom/heroes/event-manager/Events/RFYL.c",

An idea ?

Thank's in advance
me too

Edit: Problem Solve

Change get_unique_id into getcharid(0)

 
Last edited by a moderator:
Back
Top