Jump to content

Emistry

Forum Moderator
  • Posts

    9,746
  • Joined

  • Days Won

    305

Everything posted by Emistry

  1. function script F_KafGuildStor { if (Zeny < 200) { mes "You need 200 Zeny"; } else { switch(guildopenstorage()) { case GSTORAGE_OPEN: Zeny -= 200; mes "Successfully opened."; break; case GSTORAGE_STORAGE_ALREADY_OPEN: mes "Player storage is already open."; break; case GSTORAGE_ALREADY_OPEN: mes "Guild storage is already open."; break; case GSTORAGE_NO_GUILD: mes "Player is not in a guild."; break; case GSTORAGE_NO_STORAGE: mes "Guild hasn't invested in the Guild Storage Expansion skill (only if OFFICIAL_GUILD_STORAGE is enabled)."; break; case GSTORAGE_NO_PERMISSION: mes "Player doesn't have permission to use the guild storage."; break; } } close; } you can try something like this
  2. there exists a very very very old script of mine where you can do instance job change and max level maybe refer this recent topic that were still discuss about it https://rathena.org/board/topic/90158-rmodify-class-helper-by-emistry/
  3. you can use this to block the action/movement of player *setpcblock <type>,<state>{,<account ID>}; 'setpcblock' command prevents/allows the player from doing the given <type> of action according to the <state> during the player session (note: @reloadscript removes all <type> except PCBLOCK_IMMUNE). The <type> values are bit-masks, multiples of <type> can be added to change the player action. The action is blocked when the <state> is true, while false allows the action again. 'getpcblock' command return the bit-mask value of the currently enabled block flags. Available <type>: PCBLOCK_MOVE Prevent the player from moving. PCBLOCK_ATTACK Prevent the player from attacking. PCBLOCK_SKILL Prevent the player from using skills/itemskills. PCBLOCK_USEITEM Prevent the player from using usable items. PCBLOCK_CHAT Prevent the player from sending global/guild/party/whisper messages. PCBLOCK_IMMUNE Prevent the player from being hit by monsters. PCBLOCK_SITSTAND Prevent the player from sitting/standing. PCBLOCK_COMMANDS Prevent the player from using atcommands/charcommands. PCBLOCK_NPCCLICK Prevent the player from clicking/touching any NPC/shop/warp. PCBLOCK_EMOTION Prevent the player from using emotions. PCBLOCK_NPC Simulate NPC interaction. Useful for NPC with no mes window. Sum of PCBLOCK_MOVE|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS|PCBLOCK_NPCCLICK. PCBLOCK_ALL Sum of all the flags. // Make the attached player invulnerable to monster (same as @monsterignore) setpcblock PCBLOCK_IMMUNE, true; // Prevents the attached player from attacking and using skills setpcblock PCBLOCK_ATTACK|PCBLOCK_SKILL, true; // Re-enables attack, skills and item use setpcblock PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM, false;
  4. i dont think you could set more than 4 slots. client may have limitation itself if i recall correctly
  5. src/map/pc.cpp#L3843 case SP_SUBRACE: // bonus2 bSubRace,r,x; PC_BONUS_CHK_RACE(type2,SP_SUBRACE); if(sd->state.lr_flag != 2) sd->indexed_bonus.subrace[type2]+=val; + if (type2 == RC_DEMIHUMAN && sd->indexed_bonus.subrace[type2] > 80) + sd->indexed_bonus.subrace[type2] = min(80, sd->indexed_bonus.subrace[type2]); break; you can try something like this, max 80% item bonuses reduction from equipments
  6. https://github.com/rathena/rathena/wiki/Adding-a-Script refer the client side part, to add a new NPC
  7. use this *unitwalk <GID>,<x>,<y>{,"<event label>"}; *unitwalkto <GID>,<Target GID>{,"<event label>"}; This command will tell a <GID> to walk to a position, defined either as a set of coordinates or another object. The command returns a 1 for success and 0 upon failure. If coordinates are passed, the <GID> will walk to the given x,y coordinates on the unit's current map. While there is no way to move across an entire map with 1 command use, this could be used in a loop to move long distances. If an object ID is passed, the initial <GID> will walk to the <Target GID> (similar to walking to attack). This is based on the distance from <GID> to <Target ID>. This command uses a hard walk check, so it will calculate a walk path with obstacles. Sending a bad target ID will result in an error. An optional Event Label can be passed as well which will execute when the <GID> has reached the given coordinates or <Target GID>. Examples: // Makes player walk to the coordinates (150,150). unitwalk getcharid(3),150,150; // Performs a conditional check with the command and reports success or failure to the player. if (unitwalk(getcharid(3),150,150)) dispbottom "Walking you there..."; else dispbottom "That's too far away, man."; // Makes player walk to another character named "WalkToMe". unitwalkto getcharid(3),getcharid(3,"WalkToMe");
  8. alberta,167,177,3 script Simon 10079,{ [email protected]$ = "^FF0000[Simon]^000000"; switch (storage_password) { default: mes [email protected]$; mes "blabla"; break; case 1: mes [email protected]$; mes "Toete bitte je 500 Snake, Wormtail und Willows fuer mich."; set storage_password,2; break; case 2: mes [email protected]$; mes "Geh bitte die 500 Snake, Wormtail und Willows toeten."; break; case 3: mes [email protected]$; mes "blabla"; set storage_password,4; break; case 4: mes [email protected]$; mes "blabla"; break; } close; OnNPCKillEvent: if (storage_password == 2) { if (killedrid == 1025 || killedrid == 1010 || killedrid == 1024) { kill_count_variable++; dispbottom "Progress ["+kill_count_variable+"/500]"; if (kill_count_variable == 500) storage_password = 3; } end; }
  9. Items ----- You can refer to items by using HTML-like links to certain items: <ITEMLINK>Display Name<INFO>Item ID</INFO></ITEMLINK> Where <Display Name> is the name that will be displayed for your link and <Item ID> being the ID of the item you want to link to when clicked. In 2015 the tag name was changed to <ITEM> resulting in the following syntax: <ITEM>Display Name<INFO>Item ID</INFO></ITEM> The following sample will open a preview window for Red Potion: mes "Did you ever consume a <ITEMLINK>Red Potion<INFO>501</INFO></ITEMLINK>?"; // Or in 2015: mes "Did you ever consume a <ITEM>Red Potion<INFO>501</INFO></ITEM>?"; NOTE: Be aware that item links are rendered incorrectly in 2015+ clients at the moment. replace the item name display line using this format.
  10. you probably have some monsters that drop normal items which added at the card drop slot of mob_db, you should remove them. The NPC above will check if the items are added to the card drop sslot of any monster, and allow it to convert into point if yes.
  11. prontera,155,181,5 script Sample 757,{ announce "Sample message", bc_all; end; }
  12. your groups id are different than the value that stored in the variable [email protected]_id1
  13. try prontera,244,55,4 script Freebies 718,{ while (.rewardable_jobs[[email protected]] != Class && [email protected] < .rewardable_jobs_size) [email protected]++; if ([email protected] >= .rewardable_jobs_size) { mes "Your job class aren't eligible."; } else if (BaseLevel < .max_base || JobLevel < .max_job) { mes "Required "+.max_base+"/"+.max_job+"."; } else if (#Freebies) { mes "You have claimed the Reward already."; } else { #Freebies = 1; mes "Welcome to MyServerNameHere, Here are your start items!"; mes "You only get this once for each account!"; getitembound 31957,2,1; } close; OnInit: .max_base = 99; .max_job = 50; setarray .rewardable_jobs, Job_Knight, Job_Alchemist, Job_Assassin, Job_Bard, Job_Blacksmith, Job_Crusader, Job_Dancer, Job_Hunter, Job_Monk, Job_Priest, Job_Rogue, Job_Sage, Job_Wizard; .rewardable_jobs_size = getarraysize(.rewardable_jobs); end;
  14. bonus3 bAutoSpell,sk,y,n; Adds a n/10% chance to cast skill sk of level y when attacking bonus3 bAutoSpell,"RG_STRIPWEAPON",getskilllv("RG_STRIPWEAPON"),(getskilllv("RG_STRIPWEAPON") * 10); bonus3 bAutoSpell,"RG_STRIPSHIELD",getskilllv("RG_STRIPSHIELD"),(getskilllv("RG_STRIPSHIELD") * 10); bonus3 bAutoSpell,"RG_STRIPARMOR",getskilllv("RG_STRIPARMOR"),(getskilllv("RG_STRIPARMOR") * 10); bonus3 bAutoSpell,"RG_STRIPHELM",getskilllv("RG_STRIPHELM"),(getskilllv("RG_STRIPHELM") * 10); bonus3 bAutoSpell,"TF_STEAL",getskilllv("TF_STEAL"),(getskilllv("TF_STEAL") * 10);
  15. try prontera,155,181,5 script Sample 757,{ if (!ispartneron()) { mes "Your partner isn't online or not found."; } else if (getchildid()) { mes "You already has a child."; } else { mes "Would you like to adopt someone?"; next; if (select("Yes", "Cancel") == 1) { mes "Enter Child name"; input [email protected]_name$; switch(adopt(strcharinfo(0), [email protected]_name$)) { case ADOPT_ALLOWED: mes "Sent message to Baby to accept or deny."; break; case ADOPT_ALREADY_ADOPTED: mes "Character is already adopted."; break; case ADOPT_MARRIED_AND_PARTY: mes "Parents need to be married and in a party with the baby."; break; case ADOPT_EQUIP_RINGS: mes "Parents need wedding rings equipped."; break; case ADOPT_NOT_NOVICE: mes "Baby is not a Novice."; break; case ADOPT_CHARACTER_NOT_FOUND: mes "A parent or Baby was not found."; break; case ADOPT_MORE_CHILDREN: mes "You cannot adopt more than 1 child. (client message)"; break; case ADOPT_LEVEL_70: mes "Parents need to be at least level 70 in order to adopt someone. (client message)"; break; case ADOPT_MARRIED: mes "You cannot adopt a married person. (client message)"; break; } } } close; }
  16. perhaps try use the search feature in future? I am sure you could find tons of sample scripts ex: https://rathena.org/board/topic/128070-r-add-custom-points-in-this-random-box-function/?do=findComment&comment=396123 https://rathena.org/board/topic/112078-announce-item-from-random-box/?do=findComment&comment=329822
  17. offtopic: tbh, everyone is relying too much on the 3rd party tools data without realize that getitembound or bounded/untradeble items would have been your perfect solution to prevent any abusive behavior to redeem the rewards.
  18. remove the mvp from this list. setarray .mvpid[0], 1511,// Amon Ra 1647,// Assassin Cross Eremes 1785,// Atroce 1630,// Bacsojin 1039,// Baphomet 1874,// Beelzebub 1272,// Dark Lord 1719,// Datale 1046,// Doppelgangger 1389,// Dracula 1112,// Drake 1115,// Eddga 1418,// Evil Snake Lord 1871,// Fallen Bishop 1252,// Garm 1768,// Gloom Under Night 1086,// Golden Thief Bug 1885,// Gopinich 1649,// High Priest Magaleta 1651,// High Wizard Katrinn 1832,// Ifrit 1492,// Incantation Samurai 1734,// Kiel D-01 1251,// Knight of Windstorm 1779,// Ktullanux 1688,// Lady Tanee 1646,// Lord Knight Seyren 1373,// Lord of Death 1147,// Maya 1059,// Mistress 1150,// Moonlight Flower 1087,// Orc Hero 1190,// Orc Lord 1038,// Osiris 1157,// Pharaoh 1159,// Phreeoni 1623,// RSX 0806 1650,// Sniper Shecil 1583,// Tao Gunka 1708,// Thanatos 1312,// Turtle General 1751,// Valkyrie Randgris 1685,// Vesper 1648,// Whitesmith Harword 1917,// Wounded Morocc 1658;// Ygnizem
  19. the skill required a source target that use the skill, I dont think the NPC can actually cast the skill for you to display the effect. However, you can still create a similar result by duplicating some NPC which will display and hold the effect, since the effect required a immobile npc object to stick to it. prontera,150,180,4 script Bard 51,14,14,{ end; OnInit: .range = 5; .hp_healing_rate = 3; .sp_healing_rate = 3; getmapxy(.npc_map$, .npc_x, .npc_y, BL_NPC); initnpctimer; [email protected]_count = 0; for ([email protected] = (.npc_x - .range); [email protected] <= (.npc_x + .range); [email protected] += 2) { for ([email protected] = (.npc_y - .range); [email protected] <= (.npc_y + .range); [email protected] += 2) { [email protected]_count++; movenpc "Bard#effect_" + [email protected]_count, [email protected], [email protected]; } } end; OnTouch_: donpcevent "::OnIdunActivate"; playBGMall "57",.npc_map$,(.npc_x - .range),(.npc_y - .range),(.npc_x + .range),(.npc_y + .range); // Don't Cry Baby end; OnTimer3000: initnpctimer; areapercentheal .npc_map$,(.npc_x - .range),(.npc_y - .range),(.npc_x + .range),(.npc_y + .range), .hp_healing_rate, .sp_healing_rate; addrid(4, 0, (.npc_x - .range),(.npc_y - .range),(.npc_x + .range),(.npc_y + .range)); if (Hp < MaxHp) { [email protected] = ((MaxHp * 100) / .hp_healing_rate); skilleffect "AL_HEAL", [email protected]; } end; } - script Bard#effect -1,{ end; OnIdunActivate: misceffect EF_BOTTOM_APPLEIDUN; end; } // add more if you enlarge the effect area. prontera,1,1,4 duplicate(Bard#effect) Bard#effect_1 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_2 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_3 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_4 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_5 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_6 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_7 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_8 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_9 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_10 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_11 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_12 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_13 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_14 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_15 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_16 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_17 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_18 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_19 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_20 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_21 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_22 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_23 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_24 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_25 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_26 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_27 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_28 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_29 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_30 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_31 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_32 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_33 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_34 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_35 139 prontera,1,1,4 duplicate(Bard#effect) Bard#effect_36 139 https://imgur.com/aWiDtTb
  20. prontera,150,180,4 script Bard 51,{ end; OnInit: .range = 7; .hp_healing_rate = 3; .sp_healing_rate = 3; getmapxy(.npc_map$, .npc_x, .npc_y, BL_NPC); initnpctimer; end; OnTimer3000: initnpctimer; areapercentheal .npc_map$,(.npc_x - .range),(.npc_x - .range),(.npc_x + .range),(.npc_x + .range), .hp_healing_rate, .sp_healing_rate; addrid(4, 0, (.npc_x - .range),(.npc_x - .range),(.npc_x + .range),(.npc_x + .range)); playBGM "57"; // Don't Cry Baby end; } or prontera,150,180,4 script Bard 51,{ end; OnInit: .range = 7; .hp_healing_rate = 3; .sp_healing_rate = 3; getmapxy(.npc_map$, .npc_x, .npc_y, BL_NPC); initnpctimer; end; OnTimer3000: initnpctimer; areapercentheal .npc_map$,(.npc_x - .range),(.npc_x - .range),(.npc_x + .range),(.npc_x + .range), .hp_healing_rate, .sp_healing_rate; playBGMall "57",.npc_map$,(.npc_x - .range),(.npc_x - .range),(.npc_x + .range),(.npc_x + .range); // Don't Cry Baby end; }
  21. just use the original kro files, and dont change anything.
  22. prontera,155,181,5 script Sample 45,2,2,{ end; function func_AddWarp { [email protected]$ = getarg(0, ""); [email protected] = getarg(1, 0); [email protected] = getarg(2, 0); if (getmapusers([email protected]$) >= 0) { .map$[.map_size] = [email protected]$; .x[.map_size] = [email protected]; .y[.map_size] = [email protected]; .map_size++; } return; } OnTouch: warp .map$[.index], .x[.index], .y[.index]; end; OnInit: // func_AddWarp("map", x, y); func_AddWarp("prontera", 155, 181); func_AddWarp("payon", 0, 0); func_AddWarp("izlude", 100, 100); func_AddWarp("prt_fild01", 120, 60); OnHour00: .index = rand(.map_size); end; }
×
×
  • Create New...

Important Information

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