-
Posts
2407 -
Joined
-
Last visited
-
Days Won
52
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Capuche
-
A flood ? oO I don't like this idea sorry. It's better to write news on NPC.
-
No need NPC ID prontera,150,180,5 script cute ? -1,1,1,{ OnTouch: dispbottom "*Wind*"; dispbottom "You're so cute o.O"; end; }
-
Just add after 1st round quiz_00,20,115,3 script MVP Event GM 403,{ if( getgroupid() < 60 ) end; mes "Would you like to start the MVP event?"; next; if( select( "Yes", "No" ) == 1 ) donpcevent strnpcinfo(0)+"::OnEventStart"; close; //Time to be happening annons. OnClock0000: OnClock0600: OnClock1200: OnClock1800: OnEventStart: initnpctimer; announce "Mvp Event will start after 3 minute",0; end; OnTimer1000: enablenpc "MVP Event"; killmonsterall "guild_vs1"; announce "MVP Event: Please proceed to Prontera to join the event",0; end; OnTimer6000: announce "MVP Event will start after 2 minute",0; end; OnTimer12000: announce "Mvp Event will start after 1 minute",0; end; OnTimer18000: announce "MVP Event warper is now closed.",0; stopnpctimer; //disable the timer. disablenpc "MVP Event"; sleep 10000; mapannounce "guild_vs1","The first invasion of monsters in 10 seconds",0,0x00ff00; sleep 10000; .count = 24; monster "guild_vs1",0,0,"--ja--",1785,2,strnpcinfo(0)+"::OnMyKill"; //atroce monster "guild_vs1",0,0,"--ja--",1630,2,strnpcinfo(0)+"::OnMyKill"; //bacsojin monster "guild_vs1",0,0,"--ja--",1252,2,strnpcinfo(0)+"::OnMyKill"; //garm monster "guild_vs1",0,0,"--ja--",1688,2,strnpcinfo(0)+"::OnMyKill"; //lady tanee monster "guild_vs1",0,0,"--ja--",1147,2,strnpcinfo(0)+"::OnMyKill"; //maya monster "guild_vs1",0,0,"--ja--",1150,2,strnpcinfo(0)+"::OnMyKill"; //moonlight flower monster "guild_vs1",0,0,"--ja--",1120,2,strnpcinfo(0)+"::OnMyKill"; //ghostring monster "guild_vs1",0,0,"--ja--",1582,2,strnpcinfo(0)+"::OnMyKill"; //deviling monster "guild_vs1",0,0,"--ja--",1059,2,strnpcinfo(0)+"::OnMyKill"; //mistress monster "guild_vs1",0,0,"--ja--",1087,2,strnpcinfo(0)+"::OnMyKill"; //orc hero monster "guild_vs1",0,0,"--ja--",1159,2,strnpcinfo(0)+"::OnMyKill"; //phreeoni monster "guild_vs1",0,0,"--ja--",1289,2,strnpcinfo(0)+"::OnMyKill"; //maya purple end; OnMyKill: .count--; if( .count ) end; mapannounce "guild_vs1","The second invasion of monsters in 10 seconds.",0,0x00ff00; sleep 10000; monster "guild_vs1",0,0,"--ja--",1511,2; //amon ra monster "guild_vs1",0,0,"--ja--",1039,2; //baphomet monster "guild_vs1",0,0,"--ja--",1719,2; //detale monster "guild_vs1",0,0,"--ja--",1046,2; //doppelganger monster "guild_vs1",0,0,"--ja--",1389,2; //Dracula monster "guild_vs1",0,0,"--ja--",1112,2; //drake monster "guild_vs1",0,0,"--ja--",1115,2; //Eddga monster "guild_vs1",0,0,"--ja--",1418,2; //Evil Snake Lord monster "guild_vs1",0,0,"--ja--",1373,2; //Lord of Death monster "guild_vs1",0,0,"--ja--",1190,2; //Orc Lord monster "guild_vs1",0,0,"--ja--",1157,2; //Pharaoh sleep 120000; mapannounce "guild_vs1","The Third Invasion of monsters in 10 seconds.",0,0x00ff00; sleep 10000; monster "guild_vs1",0,0,"--ja--",1874,1; //Beelzebub monster "guild_vs1",0,0,"--ja--",1272,1; //Dark Lord monster "guild_vs1",0,0,"--ja--",1768,1; //Gloom Under Night monster "guild_vs1",0,0,"--ja--",1086,1; //Golden Thief Bug monster "guild_vs1",0,0,"--ja--",1832,1; //Ifrit monster "guild_vs1",0,0,"--ja--",1492,1; //Incantation Samurai monster "guild_vs1",0,0,"--ja--",1734,1; //kiel monster "guild_vs1",0,0,"--ja--",1251,1; //Stormy Knight monster "guild_vs1",0,0,"--ja--",1779,1; //ktullanux monster "guild_vs1",0,0,"--ja--",1038,1; //Osiris monster "guild_vs1",0,0,"--ja--",1623,1; //RSX sleep 120000; mapannounce "guild_vs1","The Third Invasion of monsters in 10 seconds.",0,0x00ff00; sleep 10000; monster "guild_vs1",0,0,"--ja--",1583,2; //Tao Gunka monster "guild_vs1",0,0,"--ja--",1708,2; //Thanatos monster "guild_vs1",0,0,"--ja--",1312,2; //turtle general monster "guild_vs1",0,0,"--ja--",1751,1; //randgris monster "guild_vs1",0,0,"--ja--",1871,1; //fallen bishop monster "guild_vs1",0,0,"--ja--",1685,1; //vesper monster "guild_vs1",0,0,"--ja--",1646,1; //lord knight monster "guild_vs1",0,0,"--ja--",1651,1; // //disablenpc "Kenny"; end; OnInit: disablenpc "MVP Event"; end; } prontera,155,162,5 script MVP Event 811,{ mes "Event will begin after 1 minute."; mes "You want to participate?"; next; mes "Well, you are registered"; mes "Want to get to locations of event?"; next; menu "Yes.",case1,"No.",case2; case1: warp "guild_vs1",0,0; close; case2: mes "[Mvp]"; mes "Well, come whenever you want."; close; } // -- Mapflags guild_vs1 mapflag nowarp guild_vs1 mapflag nowarpto guild_vs1 mapflag noteleport guild_vs1 mapflag nomemo guild_vs1 mapflag nobranch guild_vs1 mapflag nopenalty guild_vs1 mapflag nosave SavePoint guild_vs1 mapflag pvp off I don't know why it didn't hide 'coz I cleaned it without thinking... Edit: I had misread >.< @ewanjeli set a variable is more ressource freely than mobcount
-
If the player own a guild, you must uptade his name in guild table too. But I think uptade table for this is too complicated. I believe fakename is better but you aren't forced to believe me XD prontera,150,180,5 script I like Rabbit 456,{ Timepgm = gettimetick(2) + 20; dispbottom "Display [Cool] during 20 sec."; end; OnPCLoginEvent: if( Timepgm > gettimetick(2) ) atcommand "@fakename [Cool] "+ strcharinfo(0); else Timepgm = 0; end; }
-
I suggest to add option to trigger multi maps. Besides it's a nice script.
-
@Loki Some mistake He asks for Double rate on Monday to Friday and you put if(gettime(4)==0 || gettime(4)==1 || gettime(4)==2 || gettime(4)==3 || gettime(4)==4 ) { Then saturday to Monday // friday to monday Missing one curly too. I have updated your script if you don't mind - script triple_exp -1,{ OnInit: // original Base/Job Exp and Drop Rates set .bexp_rate, 1; //Put you rate... set .jexp_rate, 1; //put you rate... OnHour16: OnHour23: if( gettime(4) != 0 && gettime(4) != 6 || ( gettime(4) == 1 && gettime(3) >= 16 ) ) { // Monday to Friday if( gettime(3) >= 23 || gettime(3) < 16 ) { announce "Double Event is finished!",bc_all,0xFF6060; callsub L_ratio, 1; } else { announce "Double Event Starting!", bc_all; callsub L_ratio, 2; } } OnHour12: if( !gettime(4) || ( gettime(4) == 6 && gettime(3) >= 12 ) || ( gettime(4) == 1 && gettime(3) < 12 ) ) { announce "Triple Event is Starting!",bc_all,0xFF6060; callsub L_ratio, 3; } else if( gettime(4) == 1 && gettime(3) == 12 ) { announce "Triple Event is finished!",bc_all,0xFF6060; callsub L_ratio, 1; } else callsub L_ratio, 1; end; L_ratio: setbattleflag "base_exp_rate", .bexp_rate * 100 * getarg( 0 ); setbattleflag "job_exp_rate", .jexp_rate * 100 * getarg( 0 ); atcommand "@reloadmobdb"; end; }
-
Adding a commands with a NPC script (doc/script_commands.txt) Otherwise it seems you want @afk command... then there is this release.
-
Link unreachable.
-
Implode commands works on eAthena according to informations. Try to use "," instead of ":".
-
Search and replace if (getgmlevel()>=$@GMLevel){goto GM_Player;} by if (getgmlevel()>=$@GMLevel || getgroupid() == 2 || getgroupid() == 5) goto GM_Player; and menu "Turn ^FF0000ON^000000 / ^0000FFOFF^000000 Event",iEvent,"Event Settings",iSettings; by menu "Turn ^FF0000ON^000000 / ^0000FFOFF^000000 Event",iEvent, ( ( getgmlevel() == 99 || getgroupid() == 5 ) ? "Event Settings" : "" ),iSettings;
-
NPC can give 2 or more rewards if more items available?
Capuche replied to Currently's question in Scripting Support
set .@dreams_box, 0; // multi Trade Heaven Box for Dream Box ? (1: yes / 0: disabled) set .@multi_heaven, 1; // multi trade blue card to heaven box ? (1: yes / 0: disabled) //============================================================ hc_pront,164,166,4 script Heaven Dungeon Info 510,{ //===== Config: ============================================== set .npcname$,"[^FF0000 Heaven Set ^000000]"; //Change to whatever you want the NPC name to be setarray .reqid[1],6011,6012,6013,6015,6016,6017,6018,6019,6054,6055,6056,6057,6058,6059,6236,6485,6486,6487; //Item IDs for the items, required for item checks setarray .reqn$[1],"Blue B Card","Blue C Card","Blue J Card","Blue M Card","Blue Q Card","Blue T Card","Blue V Card","Blue Z Card","Blue 6 Card","Character Week Card","Character Year Card","Character Lee Card","Character Ben Card","Character Project Card","Blue 7 Card","Blue 2 Card","Blue 0 Card","Blue 1 Card"; //These are names of the required items, for the dialogue setarray .reqa[1],1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; //These are how many of each item is required set .prize,25002; //Change this to the Item ID of the item reward set .prizen$,"Heaven Set Box"; //Change this to the name of your reward set .prizea,1; //Change this to the amount of the prize item set .zeny,0; //Amount of zeny for quest (set to 0 to disable) set .@dreams_box, 0; // multi Trade Heaven Box for Dream Box ? (1: yes / 0: disabled) set .@multi_heaven, 1; // multi trade blue card to heaven box ? (1: yes / 0: disabled) L_QUEST: mes .npcname$; mes "Hah! Hello there "+strcharinfo(0); next; mes .npcname$; mes "I don't get many visitors, so I assume you're after my legendary ^FF0000"+.prizen$+"^000000?"; menu "Of course",-,"What is Heaven Set?",L_EXIT,"^FF0000Trade my Heaven Box for Dream Box^000000",dreambox; next; mes .npcname$; mes "Great! I love business. I can make you a ^FF0000"+.prizen$+"^000000, but only if you bring me the materials required."; next; mes .npcname$; mes "Would you like me to make one for you?"; menu "Yes",-,"No",L_EXIT; next; if( .@multi_heaven ) { mes .npcname$; mes "First, how much ^FF0000"+.prizen$+"^000000 do you like to do ?"; if( input( .@num_item, 1, 1000 ) != 0 ) { mes "Wrong number."; close; } next; } else set .@num_item, 1; mes .npcname$; mes "I'll need the following:"; for (set .@x,1; .@x < getarraysize(.reqid); set .@x,.@x + 1) mes ( .reqa[.@x] * .@num_item ) +" ^FF0000"+.reqn$[.@x]+"^000000"; if (.zeny > 0) mes ( .zeny * .@num_item ) +" ^FF0000Zeny^000000"; next; mes .npcname$; mes "Do you have those items?"; menu "Yes",-,"No",L_EXIT; next; mes .npcname$; for (set .@x,1; .@x < getarraysize(.reqid); set .@x,.@x + 1) { if(countitem(.reqid[.@x]) >= .reqa[.@x] * .@num_item) {mes "You've got enough ^00FF00"+.reqn$[.@x]+"^000000";} else {mes "You need more ^FF0000"+.reqn$[.@x]+"^000000";} } if (.zeny > 0) { if (Zeny < .zeny * .@num_item) {mes "You're missing ^FF0000Zeny^000000";} else {mes "You've got enough ^00FF00Zeny^000000";} } next; mes .npcname$; mes "Would you like to complete the quest?"; menu "Yes please!",-,"No Thanks",L_EXIT; next; for (set .@x,1; .@x < getarraysize(.reqid); set .@x,.@x + 1) { if(countitem(.reqid[.@x]) < .reqa[.@x] * .@num_item) goto L_EXIT2; } if (.zeny > 0) { if (Zeny < .zeny * .@num_item) goto L_EXIT2; } mes .npcname$; mes "Brilliant! Fantastic! Here you go."; for (set .@x,1; .@x < getarraysize(.reqid); set .@x,.@x + 1) { delitem .reqid[.@x],.reqa[.@x] * .@num_item; } if (.zeny > 0) { set Zeny, Zeny - .zeny * .@num_item; } goto L_FINAL2; dreambox: next; mes .npcname$; if( .@dreams_box ) { mes "How much Heaven Set Boxes do you want ?"; if( input( .@num_item, 1, 1000 ) != 0 ) { mes "Wrong number."; close; } } else set .@num_item, 1; mes "Requirement:"; mes ( 50 * .@num_item ) +" Heaven Set Boxes."; mes .@num_item +" C Grade Coin."; mes .@num_item +" B Grade Coin."; mes .@num_item +" A Grade Coin."; menu "Trade.",-; next; if (countitem(25002) < 50 * .@num_item || countitem(6418) < .@num_item || countitem(6419) < .@num_item || countitem(6420) < .@num_item) { mes .npcname$; mes "You do not have enough!"; close; } else { mes .npcname$; mes "Here you go!"; getitem 13825,.@num_item; delitem 25002,50 * .@num_item; delitem 6418,.@num_item; delitem 6419,.@num_item; delitem 6420,.@num_item; close; } L_EXIT: next; mes .npcname$; mes "Think about it as the Siege Set with no autocast skills."; mes " "; mes "It gives +40 all stats for armor, garment, and shoes."; next; mes "If you complete the set, you get extra +40 all stats!"; close; L_EXIT2: next; mes .npcname$; mes "I'm sorry, you don't have enough!"; close; L_FINAL2: next; mes .npcname$; mes "Brilliant! Fantastic! Here you go."; getitem .prize,.@num_item; close; OnPCDieEvent: if( strcharinfo(3) == "lhz_dun04" ) warp "hc_pront",163,194; end; } hc_pront,145,191,5 script Build Helper 542,{ waitingroom "Class Builds",0; set .@npc$,"[Class Build]"; mes .@npc$; mes "Hello. What build do you need help with?"; mes " "; mes "^FF0000 Think other ways to improve it. ^000000"; switch(select("PvP Build:Etc Build")) { case 1: next; mes "^FF0000 This build requires SIEGE ITEMS from the Siege room or HEAVEN ITEMS to be successful."; menu "Default Build",-; next; mes .@npc$; mes "Use any 3 headgears with ^FF0000 Professional Bonus ^000000."; mes "Select ^FF0000 Dex + 75 , 10% Demi-Human resist & Regain 30% HP FOR MID & ANY BONUS FOR LOWER."; mes " "; mes "Slot them with either ^FF0000 Seyren Windsor Cards for STR, Kathryne Keyron for MATK, Grand Peco Cards for DEX."; next; mes .@npc$; mes "Siege Armor OR Heaven Armor. Slot it with ^FF0000 Angeling Card & 2 Gloom Under Night & A Grade Coin Enchantment^000000"; mes " "; mes "^FF0000NOTE:^000000 Get an extra armor and slot it with 3 Gloom Under Night Cards & A Grade Coin Enchantment!"; next; mes .@npc$; mes "Siege Mantue or Heaven Garment. Slot it with ^FF0000 4 Noxious CArds^000000"; mes " "; mes "Siege Shoes or Heaven Shoes. Slot it with ^FF0000 3 Wild Rose Cards & A Grade Coin Enchantment^000000."; next; mes .@npc$; mes "Platinum Rings. Slot it with ^FF0000 8 Dreamworks Cards ^000000."; mes " "; mes "Siege Guard OR Platinum Shield. Slot it with ^FF0000 2 Horn Cards ^000000."; next; mes .@npc$; mes "Get Siege Weapons. Slot them with ^FF0000 2x Hydra Cards & 2x Turtle General Cards ^000000."; close; case 2: next; menu "Build for Heaven Dungeon Mobs.",-; next; mes .@npc$; mes "You need to be an Assassin cross for this to work out."; next; mes .@npc$; mes "Get any THREE headgears. Slot Upper and Middle Headgears with REGAIN item bonuses."; mes " "; mes "Get the REGAIN item bonuses from DreamworksRO Bonus."; next; mes .@npc$; mes "For the low headgear, slot it with Sacrifice item bonus."; next; mes .@npc$; mes "Buy a Brynhildr, slot it with Dokebi Card and 3 Egnigem Cenia."; mes " "; mes "Get the Nidhoggur's Shadow Garb MANTUE and slot it with 4 Marse cards."; next; mes .@npc$; mes "Get two combat knife. Slot them with 4 Turtle General Cards."; next; mes .@npc$; mes "This is the plan:"; mes "Use Enchant Deadly Poison and Sacrifice. Then just melee them."; mes "You might get dispelled here and there but just use sacrifice!"; close; } } -
Anyone please help me edit this Jobmaster script!?
Capuche replied to Ragnar Lothbrok's question in Scripting Support
//===== rAthena Script ======================================= //= Job Master //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.3 //===== Compatible With: ===================================== //= rAthena SVN r16114+ //===== Description: ========================================= //= A fully functional job changer. //===== Additional Comments: ================================= //= 1.1 Fixed reset on Baby job change. [Euphy] //= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support. [Euphy] //= 1.3 Kagerou/Oboro added. [Euphy] //============================================================ prontera,153,193,6 script Job Master 123,{ function Job_Menu; function A_An; mes "[Job Master]"; if (Class > 4049) { mes "No more jobs are available."; close; } if (checkfalcon() || checkcart() || checkriding() || ismounting()) { mes "Please remove your "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkriding())?"Peco":"")+((ismounting())?"mount":"")+" before proceeding."; close; } if (.SkillPointCheck && SkillPoint) { mes "Please use all your skill points before proceeding."; close; } set .@eac, eaclass(); set .@i, ((.ThirdClass)?roclass(.@eac&EAJ_UPPERMASK):Class); if (.@i > 6 && .@i < 22) { if (BaseLevel < .Rebirth[0] || JobLevel < ( Class > 21 ? .Rebirth[2] : .Rebirth[1] ) ) { set .@blvl, .Rebirth[0]-BaseLevel; set .@jlvl, ( Class > 21 ? .Rebirth[2] : .Rebirth[1] ) -JobLevel; mes "You need "+((.@blvl>0)?.@blvl+" more base levels "+((.@jlvl>0)?"/ ":""):"")+((.@jlvl>0)?.@jlvl+" more job levels ":"")+"to continue."; close; } if (Class > 21) { mes "Switch to third class?"; next; Job_Menu(roclass(.@eac|EAJL_THIRD)); close; } while(1) { mes "Select an option."; next; set .@i, select(" ~ ^0055FFRebirth^000000: ~ ^777777Cancel^000000"); if (.@i==3) close; mes "[Job Master]"; mes "Are you sure?"; next; Job_Menu(((.@i==1)?4001:roclass(.@eac|EAJL_THIRD))); mes "[Job Master]"; } } set .@j1, roclass(.@eac|EAJL_2_1); set .@j2,roclass(.@eac|EAJL_2_2); if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE) setarray .@exp[0],roclass(.@eac|EAJL_THIRD),99; if (Class == Job_Ninja) setarray .@exp[0],.@j1,70; if (.@exp[0] && .ThirdClass) { if (BaseLevel < .Rebirth[0] || JobLevel < .@exp[1]) { set .@blvl, .Rebirth[0]-BaseLevel; set .@jlvl, .@exp[1]-JobLevel; mes "You need "+((.@blvl>0)?.@blvl+" more base levels "+((.@jlvl>0)?"/ ":""):"")+((.@jlvl>0)?.@jlvl+" more job levels ":"")+"to continue."; close; } mes "Switch to "+jobname(.@exp[0])+"?"; next; Job_Menu(.@exp[0]); close; } if (.@eac&EAJL_2) if (.@eac&(EAJL_UPPER|EAJL_BABY) || roclass(.@eac|EAJL_UPPER) == -1) { mes "No more jobs are available."; close; } if ((.@eac&EAJ_BASEMASK) == EAJ_NOVICE) { if (JobLevel < .JobReq[0]) mes "A job level of "+.JobReq[0]+" is required to change into the 1st Class."; else if (Class == 4001 && .LastJob && lastJob) { mes "Switch classes now?"; next; Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER)); } else switch(Class) { case 0: Job_Menu(1,2,3,4,5,6,23,4046,24,25,4023); case 4001: Job_Menu(4002,4003,4004,4005,4006,4007); case 4023: Job_Menu(4024,4025,4026,4027,4028,4029,4045); default: mes "An error has occurred."; break; } close; } if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1) mes "No more jobs are available."; else if (!(.@eac&EAJL_2) && JobLevel < .JobReq[1]) mes "A job level of "+.JobReq[1]+" is required to change into the 2nd Class."; else if (.LastJob && lastJob && (.@eac&EAJL_UPPER)) { mes "Switch classes now?"; next; Job_Menu(lastJob+4001); } else Job_Menu(.@j1,.@j2); close; function Job_Menu { while(1) { if (getargcount() > 1) { mes "Select a job."; set .@menu$,""; for(set .@i,0; .@i<getargcount(); set .@i,.@i+1) set .@menu$, .@menu$+" ~ "+jobname(getarg(.@i))+":"; set .@menu$, .@menu$+" ~ ^777777Cancel^000000"; next; set .@i, getarg(select(.@menu$)-1,0); if (!.@i) close; if ((.@i == 23 || .@i == 4045) && BaseLevel < .SNovice) { mes "[Job Master]"; mes "A base level of "+.SNovice+" is required to turn into a "+jobname(.@i)+"."; close; } mes "[Job Master]"; mes "Are you sure?"; next; } else set .@i, getarg(0); if (select(" ~ Change into ^0055FF"+jobname(.@i)+"^000000 class: ~ ^777777"+((getargcount() > 1)?"Go back":"Cancel")+"^000000") == 1) { mes "[Job Master]"; mes "You are now "+A_An(jobname(.@i))+"!"; if (.@i==4001 && .LastJob) set lastJob, Class; jobchange .@i; if (.@i==4001 || .@i==4023) resetlvl(1); specialeffect2 338; specialeffect2 432; if (.Platinum) callsub Get_Platinum; close; } if (getargcount() == 1) return; mes "[Job Master]"; } end; } function A_An { setarray .@A$[0],"a","e","i","o","u"; set .@B$, "_"+getarg(0); for(set .@i,0; .@i<5; set .@i,.@i+1) if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0); return "a "+getarg(0); } Get_Platinum: skill 142,1,0; switch(BaseClass) { case 0: if (Class !=23) skill 143,1,0; break; case 1: skill 144,1,0; skill 145,1,0; skill 146,1,0; break; case 2: skill 157,1,0; break; case 3: skill 147,1,0; skill 148,1,0; break; case 4: skill 156,1,0; break; case 5: skill 153,1,0; skill 154,1,0; skill 155,1,0; break; case 6: skill 149,1,0; skill 150,1,0; skill 151,1,0; skill 152,1,0; break; default: break; } switch(BaseJob) { case 7: skill 1001,1,0; break; case 8: skill 1014,1,0; break; case 9: skill 1006,1,0; break; case 10: skill 1012,1,0; skill 1013,1,0; break; case 11: skill 1009,1,0; break; case 12: skill 1003,1,0; skill 1004,1,0; break; case 14: skill 1002,1,0; break; case 15: skill 1015,1,0; skill 1016,1,0; break; case 16: skill 1007,1,0; skill 1008,1,0; skill 1017,1,0; skill 1018,1,0; skill 1019,1,0; break; case 17: skill 1005,1,0; break; case 18: skill 238,1,0; break; case 19: skill 1010,1,0; break; case 20: skill 1011,1,0; break; default: break; } return; OnInit: setarray .Rebirth[0],99,50,70; // Minimum base level, job level to rebirth / job level to change to third class setarray .JobReq[0],10,40; // Minimum job level to turn into 1st class, 2nd class set .ThirdClass,1; // Enable third classes? (1: yes / 0: no) set .SNovice,45; // Minimum base level to turn into Super Novice set .LastJob,1; // Enforce linear class changes? (1: yes / 0: no) set .SkillPointCheck,1; // Force player to use up all skill points? (1: yes / 0: no) set .Platinum,1; // Get platinum skills automatically? (1: yes / 0: no) end; } Player must be trans class level 99/70 to change into third class. -
Usage // Shop NPCs -- supplying no argument displays entire menu. // callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}}; Example dicastes01,228,197,5 script Quest Shop#2 958,{ callfunc "qshop",1; } call only shop 1 dicastes01,228,197,5 script Quest Shop#2 958,{ callfunc "qshop",2; } call only shop 2 dicastes01,228,197,5 script Quest Shop#2 958,{ callfunc "qshop",1,2; } call shop 1 and 2
-
Request for additional .. Thanks in advance !
Capuche replied to Syndicate's question in Script Requests
Search and replace set .@i, select(" ~ ^0055FFRebirth^000000:"+((.ThirdClass)?" ~ ^FF0000Third Class^000000":"")+": ~ ^777777Cancel^000000"); by set .@i, select(" ~ ^0055FFRebirth^000000: ~ ^777777Cancel^000000"); I'm not sure so I won't tell. -
Yes it is. Also if a player take the quest at 11:51 tuesday and finish it at 11:59 tuesday, on 00:01 wednesday he can do the quest again but he must wait 00:01 thursday to do it again. Finally it's the same as waiting 24h. btw reward and items required switch with the day. It would be strange to do a tick when you must wait 24h.
-
Request for additional .. Thanks in advance !
Capuche replied to Syndicate's question in Script Requests
You can use jobmaster of the svn. http://svn.rathena.org/svn/rathena/trunk/npc/custom/jobmaster.txt Replace if (.@i==4001 || .@i==4023) resetlvl(1); to if (.@i==4001 || .@i==4023 || eaclass()&EAJL_THIRD) resetlvl(1); -
Try this one. jupe_ele,36,53,6 script Event Invasion 105,{ setarray .@mp$[1], "prontera", "morocc", "geffen", "payon", "alberta", "izlude", "aldebaran", "xmas (lutie)", "comodo", "yuno", "amatsu", "gonryun", "umbala", "niflheim", "louyang", "jawaii", "ayothaya", "einbroch", "hugel", "rachel", "veins", "moscovia", "midgard camp", "manuk", "splendide", "brasilis", "el dicastes", "mora", "dewata", "malangdo island", "malaya port", "eclage"; setarray .mapflag_event, mf_nopvp, mf_nomobloot, mf_nobranch; // GM menu //It allows GMs Level 50 or more to Start and Stop invasions. if( getgmlevel() > .gm ) { if( .count ) { mes "[Event Invasion]"; mes "An invasion is in progress.."; mes "Location: " + .map_event$; mes "^FF0000"+.count+"^000000 Monsters left"; mes " "; mes "Stop invasion?"; if( select("No:Yes") ) close; donpcevent "Event Invasion::onstop"; mes "Invasion stopped"; announce "The Invasion has been stopped by "+strcharinfo(0),bc_all; close; } mes "[Event Invasion]"; mes "Please customize the Invasion event before starting it."; Main: next; mes "[Event Invasion]"; mes "MVP Item Drop:[^FF0000" + getitemname(.Item_ID) + "^000000]"; mes "Monsters Respawn:[^FF0000" + strmobinfo(1,.mob_ID) + "^000000]"; mes "Reward 1 place: [^FF0000" + getitemname(.gained[ 0 ]) + "^000000]"; mes "Reward 2 place: [^FF0000" + getitemname(.gained[ 1 ]) + "^000000]"; mes "Reward 3 place: [^FF0000" + getitemname(.gained[ 2 ]) + "^000000]"; mes "MVP Respawn:[^FF0000" + strmobinfo(1,.Mvp_ID) + "^000000]"; mes "Map Event will Start:[^FF0000"+.map_event$+"^000000]"; switch(select("Item [" + getitemname(.Item_ID) + "]", "Monster [" + strmobinfo(1,.mob_ID) + "]", "Reward for the first place [" + getitemname(.gained[ 0 ]) + "]", "Reward for the second place [" + getitemname(.gained[ 1 ]) + "]", "Reward for the third place [" + getitemname(.gained[ 2 ]) + "]", "MVP [" + strmobinfo(1,.Mvp_ID) + "]", "Select Map Event["+.map_event$+"]:Start Event")) { case 1: next; mes "[Event Invasion]"; mes "Which item would you like the MVP to drop?"; mes "Please input the item ID:"; input .Item_ID; if( getiteminfo( .Item_ID, 0 ) == -1 ) { .Item_ID = 0; mes "Unknown ID."; } goto Main; case 2: next; mes "[Event Invasion]"; mes "Please input the monster ID:"; input .mob_ID; if( strmobinfo( 1, .mob_ID ) == "" ) { .mob_ID = 0; mes "Unknown ID."; } goto Main; case 3: next; mes "[Event Invasion]"; mes "Please input the first place will drop:";// ( here i will put id reward for the first place) input .gained[ 0 ]; if( getiteminfo( .gained[ 0 ], 0 ) == -1 ) { .gained[ 0 ] = 0; mes "Unknown ID."; } goto Main; case 4: next; mes "[Event Invasion]"; mes "Please input the second place will drop:";// ( here i will put id reward for the second place) input .gained[ 1 ]; if( getiteminfo( .gained[ 1 ], 0 ) == -1 ) { .gained[ 1 ] = 0; mes "Unknown ID."; } goto Main; case 5: next; mes "[Event Invasion]"; mes "Please input the third place will drop:";// ( here i will put id reward for the third place) input .gained[ 2 ]; if( getiteminfo( .gained[ 2 ], 0 ) == -1 ) { .gained[ 2 ] = 0; mes "Unknown ID."; } goto Main; case 6: next; mes "[Event Invasion]"; mes "Please input the MVP ID:"; input .Mvp_ID; if( strmobinfo( 1, .Mvp_ID ) == "" ) { .Mvp_ID = 0; mes "Unknown ID."; } goto Main; case 7: next; mes "[Event Invasion]"; for ( set .@i, 1; .@i < getarraysize(.@mp$); set .@i, .@i + 1 ) set .@menuE$, .@menuE$ + .@mp$[.@i] + ":"; set .map_event$, .@mp$[select( .@menuE$ )]; mes "Map Event : "+.map_event$; for( .@i = 0; .@i < getarraysize( .mapflag_event ); .@i++ ) setmapflag .map_event$, .mapflag_event[ .@i ]; goto Main; case 8: next; mes "[Event Invasion]"; if( !.Item_ID || !.mob_ID || !.Mvp_ID || .map_event$ == "" || !.gained[ 0 ] || !.gained[ 1 ] || !.gained[ 2 ] ) { mes "Miss some conditions."; goto Main; } mes "Starting the event now..."; close2; goto onstart; } } // If a player clicks the NPC, it displays: mes "[Event Invasion]"; mes .count+" monster have invaded "+.map_event$+"!"; close; ///////////////////////// //The actual NPC Script// ///////////////////////// //OnMinute50: // Change this to your liking ( automatic start ) onstart: if( .count ) end; set .count, .number_mob; sleep2 1000; announce "[ Rune-Midgard Guard ]: We have trouble here in the town " + .map_event$ + "!", bc_all; sleep2 5000; announce "[ Rune-Midgard Guard ]: Everyone, we need your help to get rid of these monsters!", bc_all; monster .map_event$,0,0,"--ja--",.mob_ID, .count, strnpcinfo(0)+"::OnMyMobDead"; initnpctimer; end; OnMyMobDead: //When a mob is killed .count--; for( .@i = 0; .@i < getarraysize( .Data ); .@i++ ) if( getcharid(3) == .Data[ .@i ] ) { .Rank[ .@i ]++; break; } if( .@i == getarraysize( .Data ) ) { .Data[ .@i ] = getcharid(3); .Rank[ .@i ]++; } if( !.count ) { announce "[ Rune-Midgard Guard ]: The MvP " + strmobinfo( 1,.Mvp_ID ) + " has spawned in " + .map_event$ + "!", bc_all; monster .map_event$,0,0,"--ja--",.Mvp_ID,1,"Event Invasion::OnSpecialMobDead"; for( .@j = .number_mob; .@j > 0; .@j-- ) for( .@i = 0; .@i < getarraysize( .Rank ); .@i++ ) if( .Rank[ .@i ] == .@j && isloggedin( .Data[ .@i ] ) ) { getitem .gained[ .@W ], 1, .Data[ .@i ]; .@W++; announce .@W +"°/ "+ rid2name( .Data[ .@i ] ) +" gained 1 "+ getitemname( .gained[ .@W-1 ] ),0; if( .@W == getarraysize( .gained ) ) goto OnInit; } goto OnInit; } else announce "["+.count+"/"+.number_mob+"] " + strmobinfo(1,.mob_ID) + " left.",bc_map; end; OnSpecialMobDead: announce strcharinfo(0)+" has fought off the Invasion and has been awarded a worthy prize!", bc_all; getitem .Item_ID, 1; //Change the [5] to the amount you wish to hand out. onstop: killmonster .map_event$,"Event Invasion::OnSpecialMobDead"; for( .@i = 0; .@i < getarraysize( .mapflag_event ); .@i++ ) removemapflag .map_event$, .mapflag_event[ .@i ]; OnTimer1805000: // 30 minutes later, kills all the mobs. killmonster .map_event$,"Event Invasion::OnMyMobDead"; set .count, 0; stopnpctimer; OnInit: deletearray .Data[ 0 ], getarraysize( .Data ); deletearray .Rank[ 0 ], getarraysize( .Rank ); //- Config //-- Number of mob spawn .number_mob = 250; //-- GM Level to access the GM Menu. set .gm, 50; end; }
-
You're welcome addtimer ( 1 * 10000 ),strnpcinfo(0)+"::OnMinion"; trigger label in the current NPC. Your duplicate NPC have coordinates so in that case, addtimer will check if player is near of the NPC. Using label of floating NPC bypass this check.
-
can someone explain to me about the instance dungeon please ?
Capuche replied to gertrude's question in Scripting Support
You can find a lot of information here Instancing -
- script hjkl -1,{ mes "Bye bye~"; deltimer "hjkl::OnMinion"; // <---- must be triggered by ON function addtimer ( 1 * 10000 ),"hjkl::OnMinion"; // 1 x 10 seconds close; OnMinion: mes "[Minion]"; mes "Hello!? Can you hear me? Hello!"; next; mes "["+strcharinfo(0)+"]"; mes "? Who is this?"; next; mes "[Minion]"; mes "I'm assuming you can hear me."; close; } prontera,150,150,5 duplicate(hjkl) hjkl#1 456 In that case, use NPC name of the floating NPC instead of duplicate's name NPC in addtimer. Floating NPC bypass check range.
-
Do you have more than 128 players for your event ? if that the case, my last script would be bugging.
-
What emulator are you using ? eAthena, rAthena, other... and version ?
-
It seems correct. Post your whole script here for testing if you don't mind.
-
It was not like that but... here an edit for you. It's now like you ask for. Char 1 from account 1 finish the quest, char 2 from account 1 can't do the quest the same day. Char from account 2 can do the quest. etc. prontera,153,189,5 script dksfjdsk 100,{ .@t = gettime(4); mes "Hi, today is "+ .week$[.@t]; mes "The Daily Quest for today is ..."; mes getitemname( getd( ".req_item"+ .@t ) ); next; mes "The Items that needed are :"; .@size = getarraysize( getd( ".req_item"+ .@t ) ); for ( .@i = 1; .@i < .@size; .@i += 2 ) mes getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) +"x "+ getitemname( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ); next; if ( select ( "I want this Item", "Just walk around" ) == 2 ) { mes "OK, please come again"; close; } else if ( gettime(4) != .@t ) { mes "I'm sorry, today is a brand new day"; close; } else if( #the_day_today == gettime(4) ) { mes "You already finished the Daily Quest today."; close; } for ( .@i = 1; .@i < .@size; .@i += 2 ) { if ( countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ) < getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) ) { setarray .@not_enough[.@c], getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) - countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ); .@c += 2; } } if ( .@c ) { mes "You didn't bring enough items"; for ( .@i = 0; .@i < .@c; .@i += 2 ) mes .@not_enough[ .@i +1 ] +"x "+ getitemname( .@not_enough[ .@i ] ); close; } for ( .@i = 1; .@i < .@size; .@i += 2 ) delitem getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ); getitem getd( ".req_item"+ .@t ), 1; #the_day_today = gettime(4); mes "Congratulations for getting"; mes getitemname( getd( ".req_item"+ .@t ) ); close; OnInit: setarray .week$, "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"; setarray .req_item0, 501, 501,1, 502,1; setarray .req_item1, 501, 501,10, 502,20, 503,30, 504, 40; setarray .req_item2, 501, 501,1, 502,1; setarray .req_item3, 501, 501,1, 502,1; setarray .req_item4, 501, 501,1, 502,1; setarray .req_item5, 501, 501,1, 502,1; setarray .req_item6, 501, 501,1, 502,1; end; }
-
Repeatable in by account, non-repeatable by player the same day. prontera,153,189,5 script dksfjdsk 100,{ .@t = gettime(4); mes "Hi, today is "+ .week$[.@t]; mes "The Daily Quest for today is ..."; mes getitemname( getd( ".req_item"+ .@t ) ); next; mes "The Items that needed are :"; .@size = getarraysize( getd( ".req_item"+ .@t ) ); for ( .@i = 1; .@i < .@size; .@i += 2 ) mes getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) +"x "+ getitemname( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ); next; if ( select ( "I want this Item", "Just walk around" ) == 2 ) { mes "OK, please come again"; close; } else if ( gettime(4) != .@t ) { mes "I'm sorry, today is a brand new day"; close; } else if( the_day_today == gettime(4) ) { mes "You already finished the Daily Quest today."; close; } for ( .@i = 1; .@i < .@size; .@i += 2 ) { if ( countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ) < getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) ) { setarray .@not_enough[.@c], getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) - countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ); .@c += 2; } } if ( .@c ) { mes "You didn't bring enough items"; for ( .@i = 0; .@i < .@c; .@i += 2 ) mes .@not_enough[ .@i +1 ] +"x "+ getitemname( .@not_enough[ .@i ] ); close; } for ( .@i = 1; .@i < .@size; .@i += 2 ) delitem getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ); getitem getd( ".req_item"+ .@t ), 1; the_day_today = gettime(4); mes "Congratulations for getting"; mes getitemname( getd( ".req_item"+ .@t ) ); close; OnInit: setarray .week$, "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"; setarray .req_item0, 501, 501,1, 502,1; setarray .req_item1, 501, 501,10, 502,20, 503,30, 504, 40; setarray .req_item2, 501, 501,1, 502,1; setarray .req_item3, 501, 501,1, 502,1; setarray .req_item4, 501, 501,1, 502,1; setarray .req_item5, 501, 501,1, 502,1; setarray .req_item6, 501, 501,1, 502,1; end; }