Jump to content

General Server Support

If you have a question that does not fit specifically in the other support sub-forums sections, feel free to ask here.

Explore Questions

There are no popular questions to show right now

  1. 0 votes
    0 answers
  2. 0 votes
    1 answer
  3. 0 votes
    0 answers
  4. New Prontera Map

    Asked by skymia,

    0 votes
    0 answers
  5. How to rotate a map?

    Asked by Fou-lu,

    0 votes
    0 answers

2553 questions in this forum

  1. attributes

    0 votes
    1 answer
  2. HP loss

    0 votes
    0 answers
  3. Tarot Card of Fate Effect Cooldown

    0 votes
    3 answers
  4. ucp anti cheat for ragnarok

    0 votes
    3 answers
  5. Sound sliders in game

    0 votes
    0 answers
  6. SG's Running and GM Hide

    0 votes
    3 answers
  7. 0 votes
    1 answer
  8. map and char servers error

    0 votes
    3 answers
  9. previous cell when using sit/skill

    0 votes
    0 answers
  10. can't find certain config options

    0 votes
    2 answers
  11. i have a bug to report?

    0 votes
    0 answers
  12. Need help for dye cloth color

    0 votes
    2 answers
  13. 0 votes
    4 answers
  14. What is C-Code ? clipboard

    0 votes
    2 answers
  15. Provoke bug and server logs

    0 votes
    2 answers
  16. Old School asura

    0 votes
    23 answers
  17. 0 votes
    1 answer
  18. 0 votes
    1 answer
  19. open rachel sanctuary

    0 votes
    3 answers
  20. 0 votes
    3 answers
  21. item_db2.conf not detected

    0 votes
    6 answers
  22. remove discounts

    0 votes
    11 answers
  23. some issue with mercenary

    0 votes
    0 answers
  24. Suche Hilfe

    0 votes
    1 answer
  25. 0 votes
    5 answers
  • Featured Topics

  • Latest Commits

  • Topics

  • Posts

    • This seems to be okay but i got an error on getunitdata.    setd("$ENDLESSMODE[" + .@instance + "]", .@level_mode);                 dispbottom "Choice: " + getd("$ENDLESSMODE[" + .@instance + "]"); OnInstanceInit:     .@level_mode = getd("$ENDLESSMODE[" + instance_id() + "]");     'level_mode = .@level_mode;    function script F_Tower_Monster_Summon { .@map$ = getarg(0, ""); .@x1 = getarg(1, 0); .@y1 = getarg(2, 0); .@x2 = getarg(3, 0); .@y2 = getarg(4, 0); .@mob_name$ = getarg(5, ""); .@mob_id = getarg(6, 0); .@amount = getarg(7, 0); .@label$ = getarg(8, ""); switch('level_mode){ case 1://Normal .@bonus_hp_rate += 0; .@bonus_dmg_rate += 0; .@bonus_damagetaken += 0; .@bonus_def += 0; .@bonus_mdef += 0; .@bonus_hit += 0; .@bonus_flee += 0; break; case 2://Veteran .@bonus_hp_rate += 40; .@bonus_dmg_rate += 40; .@bonus_damagetaken += -10; .@bonus_def += 40; .@bonus_mdef += 40; .@bonus_hit += 40; .@bonus_flee += 40; break; case 3://Nightmare .@bonus_hp_rate += 80; .@bonus_dmg_rate += 80; .@bonus_damagetaken += -20; .@bonus_def += 80; .@bonus_mdef += 80; .@bonus_hit += 80; .@bonus_flee += 80; break; case 4://Hell .@bonus_hp_rate += 100; .@bonus_dmg_rate += 100; .@bonus_damagetaken += -30; .@bonus_def += 100; .@bonus_mdef += 100; .@bonus_hit += 100; .@bonus_flee += 100; break; case 5://Torment .@bonus_hp_rate += 200; .@bonus_dmg_rate += 200; .@bonus_damagetaken += -40; .@bonus_def += 200; .@bonus_mdef += 200; .@bonus_hit += 200; .@bonus_flee += 200; break; } deletearray $@mobid,getarraysize($@mobid); areamonster .@map$, .@x1, .@y1, .@x2, .@y2, .@mob_name$, .@mob_id, .@amount, .@label$; copyarray .@GID, $@mobid, getarraysize($@mobid); if(!.@bonus_hp_rate&& !.@bonus_dmg_rate&& !.@bonus_damagetaken&& !.@bonus_def&& !.@bonus_mdef&& !.@bonus_hit&& !.@bonus_flee) return; getunitdata .@GID, .@ST; if(.@bonus_hp_rate){ .@HP = .@ST[UDT_MAXHP] + ((.@ST[UDT_MAXHP] * .@bonus_hp_rate ) /100); for(.@i=0;.@i<getarraysize(.@GID);.@i++){ setunitdata(.@GID[.@i], UDT_MAXHP, .@HP); setunitdata(.@GID[.@i], UDT_HP, .@HP); } } if(.@bonus_dmg_rate){ .@ATKMIN = .@ST[UDT_ATKMIN] + ((.@ST[UDT_ATKMIN] * .@bonus_dmg_rate) /100); .@ATKMAX = .@ST[UDT_ATKMAX] + ((.@ST[UDT_ATKMAX] * .@bonus_dmg_rate) /100); .@MATKMIN = .@ST[UDT_MATKMIN] + ((.@ST[UDT_MATKMIN] * .@bonus_dmg_rate) /100); .@MATKMAX = .@ST[UDT_MATKMAX] + ((.@ST[UDT_MATKMAX] * .@bonus_dmg_rate) /100); for(.@i=0;.@i<getarraysize(.@GID);.@i++){ setunitdata(.@GID[.@i], UDT_ATKMIN, .@ATKMIN); setunitdata(.@GID[.@i], UDT_ATKMAX, .@ATKMAX); setunitdata(.@GID[.@i], UDT_MATKMIN, .@MATKMIN); setunitdata(.@GID[.@i], UDT_MATKMAX, .@MATKMAX); } } if(.@bonus_damagetaken){ .@DAMAGETAKEN = .@ST[UDT_DAMAGE_TAKEN_RATE] + ((.@ST[UDT_DAMAGE_TAKEN_RATE] * .@bonus_damagetaken) /100); for(.@i=0;.@i<getarraysize(.@GID);.@i++){ setunitdata(.@GID[.@i], UDT_DAMAGE_TAKEN_RATE, .@DAMAGETAKEN); } } if(.@bonus_def){ .@DEF = .@ST[UDT_DEF] + ((.@ST[UDT_DEF] * .@bonus_def) /100); for(.@i=0;.@i<getarraysize(.@GID);.@i++){ setunitdata(.@GID[.@i], UDT_DEF, .@DEF); } } if(.@bonus_mdef){ .@MDEF = .@ST[UDT_MDEF] + ((.@ST[UDT_MDEF] * .@bonus_mdef) /100); for(.@i=0;.@i<getarraysize(.@GID);.@i++){ setunitdata(.@GID[.@i], UDT_MDEF, .@MDEF); } } if(.@bonus_hit){ .@HIT = .@ST[UDT_HIT] + ((.@ST[UDT_HIT] * .@bonus_hit) /100); for(.@i=0;.@i<getarraysize(.@GID);.@i++){ setunitdata(.@GID[.@i], UDT_HIT, .@HIT); } } if(.@bonus_flee){ .@FLEE = .@ST[UDT_FLEE] + ((.@ST[UDT_FLEE] * .@bonus_flee) /100); for(.@i=0;.@i<getarraysize(.@GID);.@i++){ setunitdata(.@GID[.@i], UDT_FLEE, .@FLEE); } } return; } Error:   [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): #1F Controller at 0001@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): #1F Controller at 0001@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): #1F Controller at 0001@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): #1F Controller at 0001@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): #1F Controller at 0001@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): #1F Controller at 0001@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): Immortal Furnace#1 at 0002@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): Immortal Furnace#1 at 0002@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): Immortal Furnace#1 at 0002@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): Immortal Furnace#1 at 0002@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): Immortal Furnace#1 at 0002@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): Immortal Furnace#2 at 0003@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): Immortal Furnace#2 at 0003@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): Immortal Furnace#2 at 0003@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): Immortal Furnace#3 at 0004@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): Immortal Furnace#3 at 0004@tower (29,365) [Warning]: buildin_getunitdata: Error in finding object with given GID 0! [Debug]: Source (NPC): Immortal Furnace#3 at 0004@tower (29,365)  
    • Thank you, I will try it later.
    • I think your options are: 1. Recreate the script command in herc, shouldn't be that hard, I believe this info is available, just need to make a script command to get it     2. Save a dynamic global variable using the instance ID as suffix using setd between instance_create and instance_init. Once the instance starts, you can copy the value from the global variable into an instance variable. Something like that: // create instance .@instanceId = instance_create(...) // Make global var setd(sprintf("$@instance_type_%d", .@instanceId), 1 /* whatever you need to store */); // Init it instance_init(...) // ------ // This is called on instance_init OnInstanceInit: .@varName$ = sprintf("$@instance_type_%d", instance_id()); 'instanceType = getd(.@varName$); setd(.@varName$, 0); // Clean up so you don't mess up future id reuses end;   References: - OnInstanceInit: https://github.com/HerculesWS/Hercules/blob/stable/doc/script_commands.txt#L1151 - instance_create: https://github.com/HerculesWS/Hercules/blob/stable/doc/script_commands.txt#L9730 - instance_init: https://github.com/HerculesWS/Hercules/blob/stable/doc/script_commands.txt#L9793    
    • It always easy to run on linux and compile in linux, I run on ubuntu it works fine Just need to follow guide on repo README
  • Download Statistics

    • Files
      457
    • Comments
      154
    • Reviews
      240

    Latest File
    By Hyroshima

    53    0

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.