Jump to content

jupeto

Members
  • Content Count

    39
  • Joined

  • Last visited

Everything posted by jupeto

  1. The announces are on purpose, you can change the timing in the bg_common.txt script. at which part? bg_common.txt line 151 // Rotate every n seconds. OnTimer5000: Being 5000 the miliseconds of rotation and announces I see, haha I thought there were some kind of a config or something.... thanks for pointing that out for me much appreciated
  2. The announces are on purpose, you can change the timing in the bg_common.txt script. at which part?
  3. Are these normal? Spams announcement? rush_casXX map? I did recache mapcache.dat
  4. I don't know if I'm doing this right So I have a collection of character variable like so; variable_one[0] = value_one variable_two[0] = value_two variable_three[0] = value_three then I'm trying to push some data to it variable_one[getarraysize(variable_one)] = value_one_point_one variable_two[getarraysize(variable_two)] = value_two_point_one variable_three[getarraysize(variable_three)] = value_three_point_one I can see that it saves to my database but when I try to access it and loop like this for (.@i = 0; .@i < getarraysize(variable_one); .@i++) { mes variable_one[.@i]; } end; the result is only one value
  5. Thank you for your support, I did manage to get those 3 types already...
  6. [Error]: script_rid2sd: fatal error ! player not attached! [Debug]: Function: __setr (2 parameters): [Debug]: Data: variable name='.@blvl' index=0 [Debug]: Data: param name='BaseLevel' type=11 [Debug]: Source (NPC): SamplePartyBaseLevel at prontera (144,282) [Warning]: script_get_val: cannot access player variable 'BaseLevel', defaulting to 0 I only use this code getpartymember(getcharid(CHAR_ID_PARTY)); for (.@i = 0; .@i < $@partymembercount; ++.@i) { dispbottom($@partymemberaid[.@i] + " : " + $@partymembercid[.@i] + " (" + $@partymembername$[.@i]) + ")"; } close; the result of each account id and character id is 0, maybe that's why your code doesn't work... but the member name is OK EDIT 2: I wonder why the code below works, I need to specify all 3 types to get the account id, character id, and character names getpartymember(getcharid(CHAR_ID_PARTY), 0); getpartymember(getcharid(CHAR_ID_PARTY), 1); getpartymember(getcharid(CHAR_ID_PARTY), 2); .@aid = getcharid(CHAR_ID_ACCOUNT); for (.@i = 0; .@i < $@partymembercount; ++.@i) { if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) { detachrid; attachrid($@partymemberaid[.@i]); .@blvl[.@i] = BaseLevel; detachrid; attachrid(.@aid); dispbottom("" + $@partymembername$[.@i] + ": Level " + .@blvl[.@i] + ""); } } close;
  7. [Error]: script_rid2sd: fatal error ! player not attached! [Debug]: Function: dispbottom (1 parameter): [Debug]: Data: string value="Jupeto: Level 99" [Debug]: Source (NPC): Teaching Manager at prontera (144,282)
  8. Is there a way to determine base and job levels in a party? given the party id or the invoking character? using getpartymember(getcharid(CHAR_ID_PARTY));
  9. from an NPC script I have a command that gives cashpoint to a user using #CASHPOINTS += 100; the player's cashpoint increments as seen in the cash shop, but never in Flux credit points
  10. This would be *setequipoption(<equip_index>,<slot>,0,0); Already tried that but the console says [Error]: buildin_setequipoption: Option index 0 does not exist! Ah right, then there needs to be a script command for its removal. Yah, hopefully I'm trying to create a new script command for that... Also, can you please help me create a new set of options, both client and server side [EDIT] I successfully added a remove option command, still not sure if it's the best way to do it LOL... I managed to add, remove option with this... ALSO... fixed the (I think a bug) where the equipment is not forcefully equipped to the character after calculating the new stats by storing the current equipped item id of the user in a variable (eid) and use that variable to force equip (pc->equipitem(sd, i, eid);) the item /** * Remove an equipment's option value. * *removeequipoption(<equip_index>,<slot>); * * @param equip_index as the inventory index of the equipment. * @param slot as the slot of the item option (1 to MAX_ITEM_OPTIONS) * @return 0 on failure, 1 on success. */ BUILDIN(removeequipoption) { int equip_index = script_getnum(st, 2); int slot = script_getnum(st, 3); int i = -1; int eid = 0; struct map_session_data *sd = script->rid2sd(st); if (sd == NULL) { script_pushint(st, 0); ShowError("buildin_removeequipoption: Player not attached!\n"); return false; } if (slot <= 0 || slot > MAX_ITEM_OPTIONS) { script_pushint(st, 0); ShowError("buildin_removeequipoption: Invalid option index %d (Min: 1, Max: %d) provided.\n", slot, MAX_ITEM_OPTIONS); return false; } if (equip_index > 0 && equip_index <= ARRAYLENGTH(script->equip)) { if ((i = pc->checkequip(sd, script->equip[equip_index - 1])) == -1) { ShowError("buildin_setequipoptioninfo: No equipment is equipped in the given index %d.\n", equip_index); script_pushint(st, 0); return false; } } else { ShowError("buildin_removeequipoptioninfo: Invalid equipment index %d provided.\n", equip_index); script_pushint(st, 0); return false; } if (sd->status.inventory[i].nameid != 0) { eid = sd->status.inventory[i].equip; // Store the current equipped item id to a variable to use for equiping again after calculating new stats /* Add Option Index */ sd->status.inventory[i].option[slot-1].index = 0; /* Add Option Value */ sd->status.inventory[i].option[slot-1].value = 0; /* Unequip and simulate deletion of the item. */ pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); // status calc will happen in pc->equipitem() below clif->refine(sd->fd, 0, i, sd->status.inventory[i].refine); // notify client of a refine. clif->delitem(sd, i, 1, DELITEM_MATERIALCHANGE); // notify client to simulate item deletion. /* Log deletion of the item. */ logs->pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i],sd->inventory_data[i]); /* Equip and simulate addition of the item. */ clif->additem(sd, i, 1, 0); // notify client to simulate item addition. /* Log addition of the item. */ logs->pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i], sd->inventory_data[i]); pc->equipitem(sd, i, eid); // force equip the item at the original position. clif->misceffect(&sd->bl, 2); // show effect } script_pushint(st, 1); return true; } BUILDIN_DEF(removeequipoption, "ii"),
  11. This would be *setequipoption(<equip_index>,<slot>,0,0); Already tried that but the console says [Error]: buildin_setequipoption: Option index 0 does not exist!
  12. AWESOME ADDITION!!! I'm trying to add a custom option [EnumVAR.VAR_CUSTOMMAXHP[1]] = "Custom MaxHP +%d" but an error comes up after starting the client attempt to index field '?' (a nil value) [EnumVAR.MDAMAGE_SIZE_SMALL_TARGET[1]] = "Magical damage against Small size monster +%d%%", [EnumVAR.MDAMAGE_SIZE_MIDIUM_TARGET[1]] = "Magical damage against Medium size monster +%d%%", [EnumVAR.MDAMAGE_SIZE_LARGE_TARGET[1]] = "Magical damage against Large size monster +%d%%", [EnumVAR.MDAMAGE_SIZE_SMALL_USER[1]] = "Magical resistance Small size monster +%d%%", [EnumVAR.MDAMAGE_SIZE_MIDIUM_USER[1]] = "Magical resistance Medium size monster +%d%%", [EnumVAR.MDAMAGE_SIZE_LARGE_USER[1]] = "Magical resistance Large size monster +%d%%", [EnumVAR.VAR_CUSTOMMAXHP[1]] = "Custom MaxHP +%d", [EnumVAR.EnumVAR_LAST[1]] = "END"} Also, I don't see any command to remove specific item option.
  13. jupeto

    Quest Events

    Code below stacks the mark icon of exclamation and question mark, the exclamation mark doesn't cleared by the QTYPE_NONE event but without showevent(QTYPE_QUEST2,1);, the script removes the mark icon... what I want to achieve here is that the exclamation mark must be replaced by a question mark icon to indicate that the player still has some quest for that npc and that they need to accept it to proceed... prontera,xxx,xxx,x script NPC1::npc1 4_EP16_LOUVIERE,{ doevent("npc2::OnShowQuest"); } prontera,xxx,xxx,x script NPC2::npc2 4_EP16_LOUVIERE,{ showevent(QTYPE_NONE); showevent(QTYPE_QUEST2,1); end; OnShowQuest: showevent(QTYPE_QUEST,1); end; OnHideQuest: showevent(QTYPE_NONE); end; } Please enlighten me... thanks [EDIT] well I guess sleep2(1); did the job prontera,xxx,xxx,x script NPC1::npc1 4_EP16_LOUVIERE,{ doevent("npc2::OnShowQuest"); } prontera,xxx,xxx,x script NPC2::npc2 4_EP16_LOUVIERE,{ showevent(QTYPE_NONE); sleep2(1); // <------ this did the job, but is this the right thing to do? showevent(QTYPE_QUEST2,1); end; OnShowQuest: showevent(QTYPE_QUEST,1); end; OnHideQuest: showevent(QTYPE_NONE); end; }
  14. Hello did you make it work in linux? Yes I did
  15. Sorry to bump this but using #CASHPOINTS doesn't affect the credits in FluxCP
  16. Are there any scripts that has a function to get the experience gained from monster, less the tax from guild I can get the experience gained from killing monster via this command OnNPCKillEvent: dispbottom("Base Experience: " + strmobinfo(6,killedrid)); end; However, if I have a guild tax: it does't sync with the real experience gained by the player Exp: 92070 = 102300 less tax (the real experience added to the player) Exp: 102300 = normal experience gained when player killed a mob (from mob_db.conf)
  17. Can someone enlighten me with these two currencies http://ibb.co/eoVLt5 I thought the item you bought with Free Cash is character/account bound while the Cash Points is an item without any restrictions
  18. switch (jobname(Class)) { case "Acolyte": mes "I'm an Acolyte"; break; case "Thief": mes "I'm a Thief"; break; case "Merchant": mes "I'm a Merchant"; break; } Above example produces script error in file parse syntax: expect ':' (pointed in the double quotation mark after the case in `case "Acolyte"`) Please enlighten me... Thanks EDIT: fixed by just using the Class id for each job, thanks
  19. Well errors are gone, and the ".so" file was successfully created. However, console says [Error]: script error in file 'npc/custom/.../cro-newbie.txt' line 17column 5 parse_line: expect command, missing function name or calling undeclared function 15: mes "[The Newbie]"; 16: * 17: rentitem2(25511,1,1,1); ~~~~^ YAY! Got it, forgot to enable rentitem2 in conf/plugins.conf ... silly me ^__^ everything's working now
  20. CC rentitem2.c /tmp/ccn7ox2q.o: In function `plugin_init': /.../.../Hercules/src/plugins/rentitem2.c:206: undefined reference to `showmsg' /.../.../Hercules/src/plugins/rentitem2.c:205: undefined reference to `showmsg' /.../.../Hercules/src/plugins/rentitem2.c:201: undefined reference to `showmsg' /tmp/ccn7ox2q.o: In function `buildin_rentitem2': /.../.../Hercules/src/plugins/rentitem2.c:129: undefined reference to `script' /.../.../Hercules/src/plugins/rentitem2.c:156: undefined reference to `showmsg' /.../.../Hercules/src/plugins/rentitem2.c:148: undefined reference to `itemdb' /.../.../Hercules/src/plugins/rentitem2.c:180: undefined reference to `pc' /.../.../Hercules/src/plugins/rentitem2.c:182: undefined reference to `clif' /.../.../Hercules/src/plugins/rentitem2.c:137: undefined reference to `itemdb' /.../.../Hercules/src/plugins/rentitem2.c:150: undefined reference to `showmsg' /.../.../Hercules/src/plugins/rentitem2.c:140: undefined reference to `showmsg' /tmp/ccn7ox2q.o: In function `buildin_getequipexpiretick': /.../.../Hercules/src/plugins/rentitem2.c:93: undefined reference to `script' /.../.../Hercules/src/plugins/rentitem2.c:105: undefined reference to `pc' /tmp/ccn7ox2q.o: In function `atcommand_rentitem': /.../.../Hercules/src/plugins/rentitem2.c:45: undefined reference to `clif' /.../.../Hercules/src/plugins/rentitem2.c:52: undefined reference to `itemdb' /.../.../Hercules/src/plugins/rentitem2.c:72: undefined reference to `pet' /.../.../Hercules/src/plugins/rentitem2.c:85: undefined reference to `clif' /.../.../Hercules/src/plugins/rentitem2.c:80: undefined reference to `pc' /.../.../Hercules/src/plugins/rentitem2.c:81: undefined reference to `clif' /.../.../Hercules/src/plugins/rentitem2.c:63: undefined reference to `clif' /.../.../Hercules/src/plugins/rentitem2.c:67: undefined reference to `clif' /.../.../Hercules/src/plugins/rentitem2.c:55: undefined reference to `clif' collect2: ld returned 1 exit status make[1]: *** [../../plugins/rentitem2.so] Error 1 make[1]: Leaving directory `/.../.../Hercules/src/plugins' make: *** [plugins] Error 2 @Habilis
  21. MAKE mt19937ar make[1]: Entering directory `/.../.../Hercules/3rdparty/mt19937ar' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/.../.../Hercules/3rdparty/mt19937ar' MAKE libconfig make[1]: Entering directory `/.../.../Hercules/3rdparty/libconfig' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/.../.../Hercules/3rdparty/libconfig' MAKE common_sql make[1]: Entering directory `/.../.../Hercules/src/common' make[1]: Nothing to be done for `sql'. make[1]: Leaving directory `/.../.../Hercules/src/common' CONFIGURE Reconfiguring with options: config.status: creating Makefile config.status: creating src/common/Makefile config.status: creating 3rdparty/mt19937ar/Makefile config.status: creating 3rdparty/libconfig/Makefile config.status: creating src/char/Makefile config.status: creating src/login/Makefile config.status: creating src/map/Makefile config.status: creating src/plugins/Makefile config.status: creating src/tool/Makefile config.status: creating src/test/Makefile config.status: creating tools/HPMHookGen/Makefile config.status: creating tools/doxygen/Makefile MAKE plugins make[1]: Entering directory `/.../.../Hercules/src/plugins' PLUGIN sample PLUGIN db2sql PLUGIN HPMHooking_char PLUGIN HPMHooking_login PLUGIN HPMHooking_map CC rentitem2.c rentitem2.c: In function 'plugin_init': rentitem2.c:193: warning: implicit declaration of function 'GET_SYMBOL' rentitem2.c:193: warning: nested extern declaration of 'GET_SYMBOL' rentitem2.c:193: warning: assignment makes pointer from integer without a cast rentitem2.c:194: warning: assignment makes pointer from integer without a cast rentitem2.c:195: warning: assignment makes pointer from integer without a cast rentitem2.c:196: warning: assignment makes pointer from integer without a cast rentitem2.c:197: warning: assignment makes pointer from integer without a cast /tmp/ccP0MSOU.o: In function `plugin_init': /.../.../Hercules/src/plugins/rentitem2.c:193: undefined reference to `GET_SYMBOL' /.../.../Hercules/src/plugins/rentitem2.c:193: undefined reference to `script' /.../.../Hercules/src/plugins/rentitem2.c:194: undefined reference to `GET_SYMBOL' /.../.../Hercules/src/plugins/rentitem2.c:194: undefined reference to `clif' /.../.../Hercules/src/plugins/rentitem2.c:195: undefined reference to `GET_SYMBOL' /.../.../Hercules/src/plugins/rentitem2.c:195: undefined reference to `pet' /.../.../Hercules/src/plugins/rentitem2.c:196: undefined reference to `GET_SYMBOL' /.../.../Hercules/src/plugins/rentitem2.c:196: undefined reference to `itemdb' /.../.../Hercules/src/plugins/rentitem2.c:197: undefined reference to `GET_SYMBOL' /.../.../Hercules/src/plugins/rentitem2.c:197: undefined reference to `pc' /.../.../Hercules/src/plugins/rentitem2.c:206: undefined reference to `showmsg' /.../.../Hercules/src/plugins/rentitem2.c:205: undefined reference to `showmsg' /.../.../Hercules/src/plugins/rentitem2.c:201: undefined reference to `showmsg' /tmp/ccP0MSOU.o: In function `buildin_rentitem2': /.../.../Hercules/src/plugins/rentitem2.c:129: undefined reference to `script' /.../.../Hercules/src/plugins/rentitem2.c:156: undefined reference to `showmsg' /.../.../Hercules/src/plugins/rentitem2.c:148: undefined reference to `itemdb' /.../.../Hercules/src/plugins/rentitem2.c:180: undefined reference to `pc' /.../.../Hercules/src/plugins/rentitem2.c:182: undefined reference to `clif' /.../.../Hercules/src/plugins/rentitem2.c:137: undefined reference to `itemdb' /.../.../Hercules/src/plugins/rentitem2.c:150: undefined reference to `showmsg' /.../.../Hercules/src/plugins/rentitem2.c:140: undefined reference to `showmsg' /tmp/ccP0MSOU.o: In function `buildin_getequipexpiretick': /.../.../Hercules/src/plugins/rentitem2.c:93: undefined reference to `script' /.../.../Hercules/src/plugins/rentitem2.c:105: undefined reference to `pc' /tmp/ccP0MSOU.o: In function `atcommand_rentitem': /.../.../Hercules/src/plugins/rentitem2.c:45: undefined reference to `clif' /.../.../Hercules/src/plugins/rentitem2.c:52: undefined reference to `itemdb' /.../.../Hercules/src/plugins/rentitem2.c:72: undefined reference to `pet' /.../.../Hercules/src/plugins/rentitem2.c:85: undefined reference to `clif' /.../.../Hercules/src/plugins/rentitem2.c:80: undefined reference to `pc' /.../.../Hercules/src/plugins/rentitem2.c:81: undefined reference to `clif' /.../.../Hercules/src/plugins/rentitem2.c:63: undefined reference to `clif' /.../.../Hercules/src/plugins/rentitem2.c:67: undefined reference to `clif' /.../.../Hercules/src/plugins/rentitem2.c:55: undefined reference to `clif' collect2: ld returned 1 exit status make[1]: *** [../../plugins/rentitem2.so] Error 1 make[1]: Leaving directory `/.../.../Hercules/src/plugins' make: *** [plugins] Error 2 Sorry I'm not really used on debugging c
  22. Still not building any plugins regarding rentitem2 http://ibb.co/mMhRy5 even with HPMHooking uncommented
  23. Please correct me I'm wrong, I'm trying to add this feature but then; first let me say what I've d 1. Placed rentitem2.c inside 'src\plugins' 2. edited conf/plugins.conf file plugins_list: [ /* Enable HPMHooking when plugins in use rely on Hooking */ //"HPMHooking", //"db2sql", //"sample", //"other", "rentitem2", ] compiled using linux (centos 6) ./configure make clean make sql started the server using ./athena-start start then there's an error saying HPM:plugin_load: failed to load 'plugins/rentitem2.so' (error: plugins/rentitem2.so: cannot open shared object file: no such file or directory)! HPM:plugin_load: failed to load 'plugins/rentitem2.so' (error: plugins/rentitem2.so: cannot open shared object file: no such file or directory)! HPM:plugin_load: failed to load 'plugins/rentitem2.so' (error: plugins/rentitem2.so: cannot open shared object file: no such file or directory)!
  24. got sql error [SQL]: DB error - Unknown column 'id' in 'where clause' [Debug]: at c:\users\carloquilala\documents\hercules\src\map\script.c:16387 - SELECT char_id AS id, (SELECT `name` FROM `char` WHERE char_id = id),`value` FROM `char_reg_num_db` WHERE `key` = 'DSoloRank' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 5
  25. Thank you for this support
×
×
  • Create New...

Important Information

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