Jump to content

Emistry

Forum Moderator
  • Posts

    10013
  • Joined

  • Days Won

    396

Everything posted by Emistry

  1. function script F_CASH_SHOP_RANDOM { .@item_id = getarg(0); .@amount = getarg(1); setarray .@OptID[0],RDMOPT_WEAPON_ATTR_TELEKINESIS, RDMOPT_VAR_MAXHPAMOUNT; setarray .@OptVal[0],10,10; setarray .@OptParam[0],0,0; .@item_type = getiteminfo(.@item_id, ITEMINFO_TYPE); if (.@item_type == IT_ARMOR || .@item_type == IT_WEAPON) getitem3 .@item_id,.@amount,1,0,0,0,0,0,0,.@OptID,.@OptVal,.@OptParam; else getitem .@item_id,.@amount; return; } function script Costumes_R { set .@Total,14; //<%>,<ItemID>,<Amount> setarray .@P1[0],10,20764,1; //Fallen Angel Wing setarray .@P2[0],20,45008,1; //Flapping Angel Wing setarray .@P3[0],30,969,1; //Gold setarray .@P4[0],30,7620,2; //Enriched Oridecon setarray .@P5[0],30,7620,2; //Enriched Elunium setarray .@P6[0],70,7179,10; //Pods setarray .@P7[0],70,12259,2; //Miracle Medecine setarray .@P8[0],70,12684,10; //Speed Potion setarray .@P9[0],70,14586,5; //Spark Candy setarray .@P10[0],70,16682,1; //Halter Box setarray .@P11[0],90,12906,1; //Hwergelmir's Tonic setarray .@P12[0],90,12904,1; //Steamed Scorpion setarray .@P13[0],90,12903,1; //Steamed Tongue setarray .@P14[0],90,12908,1; //Immortal Stew setarray .@Default[0],45101,1; //Token Scrolls set .@i, rand(1,.@Total); if (rand(1,100) > getd(".@P"+.@i+"[0]")) { for(set .@j,0; .@j<getarraysize(.@Default); set .@j,.@j+2) { // getitem .@Default[.@j], .@Default[.@j+1]; callfunc("F_CASH_SHOP_RANDOM", .@Default[.@j], .@Default[.@j+1]); if(!.@k[0]) setarray .@k[0], .@Default[.@j], .@Default[.@j+1]; } } else{ for(set .@j,1; .@j<getarraysize(getd(".@P"+.@i)); set .@j,.@j+2) { // getitem getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); callfunc("F_CASH_SHOP_RANDOM", getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]")); if (!.@k[0]) { set .@gz,.@i; setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); break; } } } if(1<=.@gz&&.@gz<=9) announce ""+strcharinfo(0)+" has opened [Devil Scroll] and reward ["+getitemname(.@k[0])+" x "+.@k[1]+"]!",0; specialeffect2 251; end; }
  2. you should fix your missing item act/spr file, ensure you are using the valid act/spr files that exists in your data folder or grf patching database is only a temporary fix unless you remove the item from the server permanently.
  3. it shall be safe to ignore these kind of warning up to current version of MySQL 8.0+ If you'd like to avoid these warnings and play safe, update all your affected tables having column type definitions of something like INT(##) to INT (i.e. without explicitly specifying the display width)
  4. it was added to ensure character will auto disconnect after it reached the time limit. if you dont need it, might as well just remove the whole block of codes. if( battle_config.at_timeout ) { int timeout = atoi(message); status_change_start(NULL,&sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout) * 60000, 0); } or just disable the at_timeout settings as mentioned previously.
  5. conf/battle/client.conf#L17-L18 // Valid range of dyes and styles on the client. min_hair_style: 0 max_hair_style: 42
  6. just disable the setting if you dont need the feature? what's the point of changing it to auto berserk?
  7. - script KillMon2Cash -1,{ OnNPCKillEvent: .@gettimetick = gettimetick(2); if (rand(100) < 1 && .@gettimetick > @delay) { getitem 50001,1; @delay = .@gettimetick + 60; // 60 seconds } end; }
  8. you may change the default value of your SQL table. ...datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  9. - script Sample -1,{ OnTalk: mes "Enter Mob ID"; input .@mob_id; getmobdrops(.@mob_id); .@count = $@MobDrop_count; copyarray .@mob_drop_item, $@MobDrop_item, .@count; for (.@i = 0; .@i < .@count; .@i++) { mes getitemname(.@mob_drop_item[.@i]); .@menu$ = .@menu$ + getitemname(.@mob_drop_item[.@i]) + ":"; } .@i = select(.@menu$) - 1; MOB_DROP_MOB_ID = .@mob_id; MOB_DROP_ITEMID = .@mob_drop_item[.@i]; MOB_DROP_KILL = 0; close; OnNPCKillEvent: if (killedrid == MOB_DROP_MOB_ID) { MOB_DROP_KILL++; if (MOB_DROP_KILL && MOB_DROP_KILL % 100 == 0) getitem MOB_DROP_ITEMID, 1; } end; } prontera,155,181,5 script NPC 757,{ doevent "Sample::OnTalk"; } try this
  10. *npcshopadditem "<name>",<item id>,<price>{,<item id>,<price>{,<item id>,<price>{,...}}}; *npcshopadditem "<name>",<item id>,<price>,<stock>{,<item id>,<price>,<stock>{,<item id>,<price>,<stock>{,...}}}; This command will add more items at the end of the selling list for the specified NPC shop or cashshop. If you specify an item already for sell, that item will appear twice on the sell list. The function returns 1 if shop was updated successfully, or 0 if not found. NOTES: - That you cannot use -1 to specify default selling price! - If attached shop type is market shop, need an extra param after price, it's <stock> and make sure don't add duplication item! For unlimited stock use -1. OnHour00: // reset the shop item list npcshopitem "shop_name", 909, 1; npcshopdelitem "shop_name", 909; // add item with random price npcshopadditem "shop_name", 756, rand(500, 1000); npcshopadditem "shop_name", 1260, rand(1000000, 2500000); npcshopadditem "shop_name", 2609, rand(1000, 1500); npcshopadditem "shop_name", 4110, rand(2000000, 2300000); npcshopadditem "shop_name", 13404, rand(3000000, 3200000); npcshopadditem "shop_name", 4435, rand(5000000, 7000000); end;
  11. *guardian "<map name>",<x>,<y>,"<name to show>",<mob id>{,"<event label>"{,<guardian index>}}; This command is roughly equivalent to 'monster', but is meant to be used with castle guardian monsters and will only work with them. It will set the guardian characteristics up according to the castle's investment values and otherwise set the things up that only castle guardians need. Since trunk r12524: Returns the id of the mob or 0 if an error occurred. When 'guardian index' isn't supplied it produces a temporary guardian. Temporary guardians are not saved with the castle and can't be accessed by guardianinfo. just execute this script command as many times as you want to create the guardian you need for each castles.
  12. based on the snippet above, it check for the char table for data. sql-files/main.sql
  13. Reward: Script: "if (BaseLevel < MAX_LEVEL) BaseLevel++;" avoid using atcommand in npc script as it create unnecessary logs if you enabled the log system Reward: Script: "statusup2(bStr, 1);" for stat bonus
  14. SI_INCHEALRATE your server didnt declare the value for this enum/constants.
  15. remove the bounded item checking if you want to allow bounded items to use the card remover npc.
  16. I am not sure what coding language you normally use, but you have a wrong idea about NPC scripts are written https://github.com/rathena/rathena/wiki/Basic-Scripting all the script command doc/script_commands.txt all the npc script sample npc doc/sample
  17. arent the item drop rate should already be based on master drop rate ? I dont think mercenary have their own item drop rate adjustment
  18. That probably meant your emulator doesn't have these constants value or buff implemented.
  19. perhaps try alter the condition checking here ? if( itemdb_isenchant(sd->inventory.u.items_inventory[idx_card].nameid) && item_eq->slots > 3 ) return 0; // Reserved slot for Enchant is a normal slot into if(!itemdb_isenchant(sd->inventory.u.items_inventory[idx_card].nameid) && idx_card == (item_eq->slots - 1)) return 0; // Reserved slot for Enchant is a normal slot or if(itemdb_isenchant(sd->inventory.u.items_inventory[idx_card].nameid) && idx_card != (item_eq->slots - 1)) return 0; // Reserved slot for Enchant is a normal slot
  20. try remove the snow effect from lutie map through this file data/etcinfo.txt
  21. @b = callsub(L_RefinePart, EQI_HAND_R, EQI_HAND_L); // @b = callsub(L_RefinePart, EQI_HEAD_TOP, EQI_ARMOR, EQI_GARMENT, EQI_SHOES, EQI_HAND_L); _check(@b); ... ... ... L_RefinePart: .@getargcount = getargcount(); .@menu$ = ""; for (.@i = 0; .@i < .@getargcount; .@i++) { .@part = getarg(.@i, 0); .@item_id = getequipid(.@part); if (.@item_id != -1) { .@menu$ = .@menu$ + getitemname(.@item_id); } .@menu$ = .@menu$ + ":"; } .@part = select(.@menu$) - 1; return getarg(.@part); with so limited info, I guess you are just trying to fix the value stored in the @b variable. either you are using old emulator or old npc script, you should fix that.
  22. input .@item_id; .@size = query_sql("SELECT char_id, nameid, amount FROM `inventory` HAVING nameid = "+.@item_id+" ORDER BY amount DESC LIMIT 3",.@charid,.@nameid,.@amnt); for (.@i = 0; .@i < .@size; .@i++) dispbottom .@charid[.@i]+" : "+getitemname(.@nameid[.@i])+" "+.@amnt[.@i]+"pcs"; end;
  23. you can just create a usable item that give permanent stats and assign it as rewards.
×
×
  • Create New...