Jump to content

Emistry

Forum Moderator
  • Posts

    10018
  • Joined

  • Days Won

    409

Everything posted by Emistry

  1. start with reading this https://github.com/rathena/rathena/wiki/Adding-a-Script
  2. prontera,155,181,5 script Sample 4_F_KAFRA1,{ if (BaseLevel >= 99 && Zeny >= 1000000 && countitem(512) >= 1) { Zeny -= 1000000; delitem 512, 1; jobchange Job_Novice; resetlvl 1; } end; }
  3. conf/battle/client.conf#L108-L110 // Set this to 1 if your client supports status change timers and you want to use them // Clients from 2009 onward support this display_status_timers: yes set to no
  4. you added a map name named "vend_zone" but you're using "ven_zone" in your scripts. no matter what are your arguments are, when map-server said it doesn't exists, then it meant doesn't exists, you have to recheck everything that you have changed/modified.
  5. what for? you could just pass-in these item id as your parameters. function script TestFunc { message strcharinfo(0), "TestFunc called from "+getnpcid(0)+", with arg 0 "+getarg(0, 0); return; } // item 501,Red_Potion,Red Potion,0,10,,70,,,,,0xFFFFFFFF,63,2,,,,,,{ TestFunc(501); },{},{} // script TestFunc(501);
  6. db/re/attendance.yml
  7. change the itemID after every execution ... or use this DELETE FROM `auction` WHERE `nameid` IN (501,502,503); DELETE FROM `cart_inventory` WHERE `nameid` IN (501,502,503); DELETE FROM `guild_storage` WHERE `nameid` IN (501,502,503); DELETE FROM `inventory` WHERE `nameid` IN (501,502,503); DELETE FROM `mail_attachments` WHERE `nameid` IN (501,502,503); DELETE FROM `market` WHERE `nameid` IN (501,502,503); DELETE FROM `sales` WHERE `nameid` IN (501,502,503); DELETE FROM `storage` WHERE `nameid` IN (501,502,503);
  8. DELETE FROM `auction` WHERE `nameid` = 512; DELETE FROM `cart_inventory` WHERE `nameid` = 512; DELETE FROM `guild_storage` WHERE `nameid` = 512; DELETE FROM `inventory` WHERE `nameid` = 512; DELETE FROM `mail_attachments` WHERE `nameid` = 512; DELETE FROM `market` WHERE `nameid` = 512; DELETE FROM `sales` WHERE `nameid` = 512; DELETE FROM `storage` WHERE `nameid` = 512; shutdown server edit the item ID run the queries above in your database restart server
  9. sc_start SC_FLEEFOOD,20000,10;
  10. prontera,155,181,5 script Sample 4_F_KAFRA1,{ cutin "1s_1", 3; for (.@level = 1; .@level <= 7; .@level++) for (.@i = 0; .@i < (10 - .@level); .@i++) { cutin .@level+"s_"+.@i, 3; sleep2 (.@level * 100) + (.@i * 100); } close2; cutin "", 255; end; }
  11. Just create a custom class or find any unused class, and replace the sprite with GM sprite, then use item script to change the sprite of player. *changebase <job ID number>{,<account ID>}; This command will change a character's appearance to that of the specified job class. Nothing but appearance will change. The command will run for the invoking character unless an account ID is given. Altering the account ID are definitely not a correct approach and bad move. There exists reasons why account ID are unique to everyone ... and not for you to switch it with other player's account ID.
  12. doc/item_bonus.txt#L424-L427 Monster drops ------------- bonus2 bDropAddRace,r,x; Adds x% to player's drop rate when killing a monster with race r. bonus2 bDropAddClass,c,x; Adds x% to player's drop rate when killing a monster with class c.
  13. rathena could only support up to 65k for now. https://github.com/rathena/rathena/blob/master/src/map/itemdb.hpp#L10-L11
  14. if you asking for something simpler ... use the built-in attendance system instead? db/re/attendance.yml
  15. function script specialbox { .@chance = rand(100); if (.@chance == 1) { // Super Rare Item 1% .@item_id = F_Rand(2199,1599); } else if (.@chance <= 2 && .@chance >= 11) { // Rare Items .@item_id = F_Rand(911,912); } else { // Common Items .@item_id = F_Rand(909,910); } announce "["+strcharinfo(0)+"] won a ["+getitemname(.@item_id)+"] from the Special Box.",0; return; } a simpler and more appropriate approach. you shouldn't create/declare a npc variable within a function .... because it shared the value with everyone .. when you declare anything inside the function, it keep repeating the unnecessary process when other player access it again
  16. prontera,155,181,5 script PVP Warper::pvp 946,{ while(1) { mes "["+strnpcinfo(0)+"]"; .@menu$ = ""; for (.@i = 0; .@i < .map_size; .@i++) .@menu$ = .@menu$ + sprintf("%s [ %d / %d ]", .map_name$[.@i], getmapusers(.map$[.@i]), .map_max_player[.@i]) + ":"; .@i = select(.@menu$) - 1; if (.map_max_player[.@i] && getmapusers(.map$[.@i]) >= .map_max_player[.@i]) { mes "This map is currently full."; next; } else { warp .map$[.@i], 0, 0; end; } } close; OnInit: setarray .map_name$, "Epsilon Arena", "Square Arena", "Sandwich Arena", "Prontera Arena"; setarray .map$, "guild_vs1", "guild_vs3", "pvp_n_8-1", "pvp_y_1-1"; setarray .map_max_player, 15, 20, 30, 60; .map_size = getarraysize(.map$); OnTimer1000: for (.@i = 0; .@i < .map_size; .@i++) { if (getmapusers(.map$[.@i]) > 0) { specialeffect EF_BEGINSPELL6; break; } } initnpctimer; end; }
  17. prontera,155,181,5 script SavePointNPC 4_F_KAFRA1,{ getmapxy(.@map$, .@x, .@y, BL_NPC); savepoint .@map$, .@x, .@y; mes "Save point updated to "+.@map$+"("+.@x+", "+.@y+")"; close; } prontera,155,181,5 duplicate(SavePointNPC) SavePointNPC#1 4_F_KAFRA1 prontera,155,181,5 duplicate(SavePointNPC) SavePointNPC#2 4_F_KAFRA1 prontera,155,181,5 duplicate(SavePointNPC) SavePointNPC#3 4_F_KAFRA1
  18. He is trying to tell you that your script are missing the OnInit label that used to initialize all those permanent global variables that storing the settings used by the script. IF without the OnInit to execute the settings part, basically your script dont have any settings and it wont run properly.
  19. fix your file name, I am there gravity never made a file named "??-1.bmp"
  20. make sure you saved the script using correct encoding.
  21. - script Sample -1,{ OnPCKillEvent: // if equipped specific item id if (isequipped(5001)) { .@rate = rand(100); if (.@rate < 30) { getitem 969, 1; } else if (.@rate < 70) { getitem 512, 1; } else { getitem 909, 1; } } end; } - script Sample -1,{ OnPCKillEvent: // if equipped specific equipment slots if (getequipid(EQI_ACC_L) > 0 || getequipid(EQI_ACC_R) > 0) { .@rate = rand(100); if (.@rate < 30) { getitem 969, 1; } else if (.@rate < 70) { getitem 512, 1; } else { getitem 909, 1; } } end; }
  22. db/re/item_db.txt
  23. use an older client instead, I believe new client no longer display the total users currently online.
  24. try change your client langtype, i think langtype 11 or 13 should be able to work with universal language.
  25. try this prontera,155,181,5 script PVP Warper::pvp 946,{ while(1) { mes "["+strnpcinfo(0)+"]"; .@menu$ = ""; for (.@i = 0; .@i < .map_size; .@i++) .@menu$ = .@menu$ + sprintf("%s [ %d / %d ]", .map_name$[.@i], getmapusers(.map$[.@i]), .map_max_player[.@i]) + ":"; .@i = select(.@menu$) - 1; if (.map_max_player[.@i] && getmapusers(.map$[.@i]) >= .map_max_player[.@i]) { mes "This map is currently full."; next; } else { warp .map$[.@i], 0, 0; end; } } close; OnInit: setarray .map_name$, "Epsilon Arena", "Square Arena", "Sandwich Arena", "Prontera Arena"; setarray .map$, "guild_vs1", "guild_vs3", "pvp_n_8-1", "pvp_y_1-1"; setarray .map_max_player, 15, 20, 30, 60; .map_size = getarraysize(.map$); end; }
×
×
  • Create New...