Jump to content

PandaLovesHamster

Members
  • Posts

    452
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by PandaLovesHamster

  1. Examples are show on the wiki page: https://rathena.org/wiki/Getvariableofnpc prontera...{ mes "....reset?" menu "Yes",-; mes "...done"; close2; set getvariableofnpc(.winner_count, "Test"), 0; end; } Not tested. First time using the function xD
  2. prontera,123,123,4 script Quest Start 123,{ if(chest_open){ mes "..."; mes "talk to correct chest..."; close; } mes "..."; mes "..."; switch(select("Accept Quest:Decline")){ case 1: mes "...."; set .@chest,rand(0,4); switch(.@chest){ case 0: mes "..."; set chest_open,1; close; case 1: mes "..."; set chest_open,2; close; case 2: mes "..."; set chest_open,3; close; case 3: mes "..."; set chest_open,4; close; case 4: mes "..."; set chest_open,5; close; } case 2: mes "Okay.."; close; } } //Treasure Chest Start - script Treasure Chest#1 -1,{ if(chest_open != 1){ mes "..."; mes "wrong..."; close; } if(quest1_start){ for(set .@i,0; .@i < getarraysize(.quest1); .@i++){ if(countitem(.quest1[.@i]) < .quest1_amt[.@i]){ mes "..." mes "not enough"; close; } } for(set .@i,0; .@i < getarraysize(.quest1); .@i++){ delitem .quest1[.@i],.quest1_amt[.@i]; } getitem <item_id>,<quantity>; //item reward close; } mes "..."; mes "I need following:"; next; mes "..."; for(set .@i,0; .@i < getarraysize(.quest1); .@i++){ mes getitemname(.quest1[.@i])+" x"+.quest1_amt[.@i]; } set quest1_start; close; OnInit: setarray .quest1,501; //item needed setarray .quest1_amt,1; //amount needed end; } - script Treasure Chest#2 -1,{ if(chest_open != 2){ mes "..."; mes "wrong..."; close; } if(quest2_start){ for(set .@i,0; .@i < getarraysize(.quest2); .@i++){ if(countitem(.quest2[.@i]) < .quest2_amt[.@i]){ mes "..." mes "not enough"; close; } } for(set .@i,0; .@i < getarraysize(.quest2); .@i++){ delitem .quest2[.@i],.quest2_amt[.@i]; } getitem <item_id>,<quantity>; //item reward close; } mes "..."; mes "I need following:"; next; mes "..."; for(set .@i,0; .@i < getarraysize(.quest2); .@i++){ mes getitemname(.quest2[.@i])+" x"+.quest2_amt[.@i]; } set quest2_start; close; OnInit: setarray .quest2,501; //item needed setarray .quest2_amt,1; //amount needed end; } - script Treasure Chest#3 -1,{ if(chest_open != 3){ mes "..."; mes "wrong..."; close; } if(quest3_start){ for(set .@i,0; .@i < getarraysize(.quest3); .@i++){ if(countitem(.quest3[.@i]) < .quest_amt3[.@i]){ mes "..." mes "not enough"; close; } } for(set .@i,0; .@i < getarraysize(.quest3); .@i++){ delitem .quest3[.@i],.quest3_amt[.@i]; } getitem <item_id>,<quantity>; //item reward close; } mes "..."; mes "I need following:"; next; mes "..."; for(set .@i,0; .@i < getarraysize(.quest1); .@i++){ mes getitemname(.quest3[.@i])+" x"+.quest3_amt[.@i]; } set quest3_start; close; OnInit: setarray .quest3,501; //item needed setarray .quest3_amt,1; //amount needed end; } - script Treasure Chest#4 -1,{ if(chest_open != 4){ mes "..."; mes "wrong..."; close; } if(quest4_start){ for(set .@i,0; .@i < getarraysize(.quest4); .@i++){ if(countitem(.quest4[.@i]) < .quest4_amt[.@i]){ mes "..." mes "not enough"; close; } } for(set .@i,0; .@i < getarraysize(.quest4); .@i++){ delitem .quest4[.@i],.quest4_amt[.@i]; } getitem <item_id>,<quantity>; //item reward close; } mes "..."; mes "I need following:"; next; mes "..."; for(set .@i,0; .@i < getarraysize(.quest4); .@i++){ mes getitemname(.quest4[.@i])+" x"+.quest4_amt[.@i]; } set quest4_start; close; OnInit: setarray .quest4,501; //item needed setarray .quest4_amt,1; //amount needed end; } - script Treasure Chest#5 -1,{ if(chest_open != 5){ mes "..."; mes "wrong..."; close; } if(quest5_start){ for(set .@i,0; .@i < getarraysize(.quest5); .@i++){ if(countitem(.quest5[.@i]) < .quest5_amt[.@i]){ mes "..." mes "not enough"; close; } } for(set .@i,0; .@i < getarraysize(.quest5); .@i++){ delitem .quest5[.@i],.quest5_amt[.@i]; } getitem <item_id>,<quantity>; //item reward close; } mes "..."; mes "I need following:"; next; mes "..."; for(set .@i,0; .@i < getarraysize(.quest5); .@i++){ mes getitemname(.quest5[.@i])+" x"+.quest5_amt[.@i]; } set quest5_start; close; OnInit: setarray .quest5,501; //item needed setarray .quest5_amt,1; //amount needed end; } iz_dun03,229,187,4 duplicate(Treasure Chest#1) Treasure Chest#iz 123 mjo_dun03,197,201,4 duplicate(Treasure Chest#2) Treasure Chest#mjo 123 moc_pryd06,85,183,4 duplicate(Treasure Chest#3) Treasure Chest#pryd 123 pay_dun04,138,100,4 duplicate(Treasure Chest#4) Treasure Chest#pay 123 gl_cas02,176,12,4 duplicate(Treasure Chest#5) Treasure Chest#gl 123 Not tested. Made the quest repeatable.
  3. 30028,C_Wing_Of_Fly,Infinite Flywing,11,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ unitskilluseid getcharid(3),"AL_TELEPORT",1;itemheal 0,10; },{},{} Client will occasionally crash when I use this infinite fly wing. Also, it is good to note that when using this item, it will consume SP, hence the itemheal script I have added. Is there any possible fix for the client crashes? I am using 2012-04-10 client. Latest rAthena as well.
  4. ASB is Aegis Support Board correct? I've looked over their forums and didn't find any resources pointing to older version, or maybe I didn't look hard enough
  5. 30050,Try_This,Try This,11,800,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ changebase roclass(eaclass()|EAJL_BABY); },{},{} 30051,Try_This2,Try This2,11,800,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ changebase roclass(eaclass()|EAJL_UPPER },{},{} 30052,Try_This3,Try This3,11,800,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ changebase roclass(eaclass()|EAJL_THIRD },{},{} Try that one...
  6. prontera,123,123,4 script Quest Start 123,{ if(chest_done == 1){ mes "..."; mes "youre done with this quest"; close; } if(chest_open){ mes "..."; mes "talk to correct chest..."; close; } mes "..."; mes "..."; switch(select("Accept Quest:Decline")){ case 1: mes "...."; set .@chest,rand(0,4); switch(.@chest){ case 0: mes "..."; set chest_open,1; close; case 1: mes "..."; set chest_open,2; close; case 2: mes "..."; set chest_open,3; close; case 3: mes "..."; set chest_open,4; close; case 4: mes "..."; set chest_open,5; close; } case 2: mes "Okay.."; close; } } - script Treasure Chest#1 -1,{ if(chest_open != 1){ mes "..."; mes "wrong..."; close; } //make sure chest_open != value is same with number of chest //example Treasure Chest#2 should have if(chest_open != 2){ ... close; } if(chest_done == 1){ mes "..,"; mes "done..."; close; } if(quest1_start){ for(set .@i,0; .@i < getarraysize(.quest1); .@i++){ if(countitem(.quest1[.@i]) < .quest_amt[.@i]){ mes "..." mes "not enough"; close; } } for(set .@i,0; .@i < getarraysize(.quest1); .@i++){ delitem .quest1[.@i],.quest_amt[.@i]; } getitem <item_id>,<quantity>; set chest_done,1; close; } mes "..."; mes "I need following:"; next; mes "..."; for(set .@i,0; .@i < getarraysize(.quest1); .@i++){ mes getitemname(.quest1[.@i])+" x"+.quest_amt[.@i]; } set quest1_start; close; OnInit: setarray .quest1,501; //item needed setarray .quest1_amt,1; //amount needed end; } //Just continue adding - script Treasure Chest#2 -1, //{ ... with copy paste of code from treasure chest#1, just make sure you change the values properly } Made this quickly, not tested yet and its like skeleton, but it should be easy to set, just read out the comments i've made. If it has some errors let me know, I'll try to help as much as I can.
  7. More information? Does this mean if the player has TCG, whenever he logs in he changes to a baby class? (looks only, not class itself)
  8. switch(select(((!Mission0)?" ~ New Mission::":": ~ Mission Status: ~ Abandon Mission")+": ~ Information: ~ Mission Shop: ~ View Top Hunters: ~ ^777777Cancel^000000")) { Remove : ~ Mission Shop Remove Case 5: and replace Case 6: with Case 5: .. Now to change to item-based, proceed to this line set #Mission_Points, #Mission_Points+.@Mission_Points; comment it, and then replace it with getitem <item_id>,<quantity>; Note: Try what I said above, not sure if it will work. If there's any problems post here so I can help solve. Don't forget to include map server errors fi there's any.
  9. Added the following: Guild Registration / Guild LImiter NPC Background Music NPC Update: Updated Background Music NPC
  10. This happens to me too, but its with my picklog. It seems that the database crashes when trying to update the logs causing the freeze of the server. It recovers in time, but would recover more faster if you "empty" or truncate the log database that crashes.
  11. Sorry for the lousy scripting. I just finished the script a few moments after I posted it so it wasn't really tested. Anyways, you're welcome hope it comes handy. I posted the script on my Script Collection post. https://rathena.org/board/topic/104901-pandas-basic-script-collections/#entry298164 Thanks and hope it helps
  12. Well I was the one who asked the question first. Anyways, here's the finished script, though it's just a script created from copy-pasting people's already existing work. Credits to the owners (I already forgot their names) - Pretty sure one of them was AnnieRuru. Note: This has been tested to work. The new addition in the script which I just added is not tested, particularly this part: if ( getmapflag( strcharinfo(3), mf_gvg_castle ) && ( agitcheck() || agitcheck2() )) { .@len = getarraysize($App_Guilds); for( .@i=0; .@i <= .@len; .@i++ ) { if( getcharid(2) == $App_Guilds[.@i] ) set .@Guild_Check, .@Guild_Check+1; } if( .@Guild_Check < 1 ) { dispbottom "Your guild has not yet been approved, please contact the GMs"; sleep2 3000; warp "SavePoint",0,0; end; } if( !getcharid(2) ) { dispbottom "Sorry only members of a guild may enter a castle."; close; } Main Script //Modified by - PandaLovesHamster //Custom Guild Limiter ayothaya,171,144,5 script Guild Limiter 833,{ // this part registers the guild function sf { function s; .@a = getarg(2); .@len = getarg(3); return ( sprintf( getarg(0), s(.@a, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)) ) +(( .@a+1 < .@len )?":Next":":") +(( .@a-11 > 0 )?":Back":":") +":Cancel" ); function s { if( getarg(0) >= getarg(1) ) return ""; else { .@name$ = getguildname(getelementofarray(getarg(2),getarg(0))); return .@name$=="null"?"":.@name$; } }; }; function nex { return((getarg(0)+10)<getarg(1)?getarg(0)+10:getarg(1)-(getarg(1)%10)); }; function bac { return((getarg(0)-10)>=0?getarg(0)-10:0); }; if(getgmlevel()>=80 ) { mes .Npc_Name$; mes "Hello Mr. GM what would you like to do?"; next; switch( select("Add/Remove Guilds:Clear Guild Data:Player Menu:Cancel") ) { case 1: mes .Npc_Name$; mes "Would you like to add or remove a guild?"; .@a_len = getarraysize($App_Guilds); .@format$ = "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s"; next; if( select("Remove:Add") == 1 ) { while( .@a != 9999 ) { select( sf( .@format$, $App_Guilds, .@a, .@a_len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@a_len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname($App_Guilds[.@select])+"]^000000 guild. Would you like to remove them from the accepted guilds?"; next; if( select("Yes:No") == 1 ) { deletearray($App_Guilds[.@select],1); mes .Npc_Name$; mes "The guild has been removed!"; } close; } } } else { mes .Npc_Name$; mes "Please input guild name or masters name."; next; input(.@input$); .@len = query_sql( "Select `guild_id` from `guild` where `name` like '%"+escape_sql(.@input$)+"%' or `master` like '%"+escape_sql(.@input$)+"%';",.@guild_id ); while( .@a != 9999 ) { select( sf( .@format$, .@guild_id, .@a, .@len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; .@a_len = getarraysize($App_Guilds); for(.@b=0;.@b<.@a_len;.@b++) if( $App_Guilds[.@b]==.@guild_id[.@select] ) { mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guild. I'm sorry but that guild has already been added to the accepted list."; close; } mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guild. Would you like to add them to the accepted guilds?"; next; if( select("Yes:No") == 1 ) { .@a_len = getarraysize($App_Guilds); if( .@a_len>=128 ) { mes .Npc_Name$; mes "I'm sorry but the accepted list is full please make some room and try again..."; } else { mes .Npc_Name$; mes "The guild was successfully added!"; $App_Guilds[.@a_len] = .@guild_id[.@select]; } } close; } } } case 2: mes .Npc_Name$; mes "Are you sure you want to clear the guild data?!"; next; if( select("Yes!:No!")==1 ) { mes .Npc_Name$; mes "This is you last chance. Are you surely sure as sure can be?"; next; if( select("Surly!:No, wait... Where am I?!!")==1 ) deletearray($App_Guilds); } if( @menu==1 ) { mes .Npc_Name$; mes "The deed is done..."; } else { mes .Npc_Name$; mes "Wow that was a close one... Have a nice day!"; } close; case 3: break; case 4: mes .Npc_Name$; mes "Alright, have a nice day!"; close; } } .@len = getarraysize($App_Guilds); for( .@i=0; .@i <= .@len; .@i++ ) { if( getcharid(2) == $App_Guilds[.@i] ) set .@Guild_Check, .@Guild_Check+1; } // This part ejects players when they are in the map OnPCLoadMapEvent: if( getcharid(2) == $App_Guilds[.@i] ){ .count = 0; .@origin = getcharid(3); addrid 3, 0, getcharid(2); if ( strcharinfo(3) == .checkmap$ ) .count++; if ( !.@origin ) end; if ( .count > 5 ) { // 5 means only 5 players per guild allowed in a map. message strcharinfo(0), "Your guild members are over the limit"; sleep2 2000; warp "SavePoint", 0,0; } } end; OnInit: setarray .@checkmap$, "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05", "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05"; .@len = getarraysize( .@checkmap$ ); for ( .@i = 0; .@i < .@size; .@i++ ) { setmapflag .@checkmap$[.@i], mf_loadevent; setd "."+ .@checkmap$[.@i], 1; } end; } - script kjdhfkjshf -1,{ OnPCLoadMapEvent: if ( getmapflag( strcharinfo(3), mf_gvg_castle ) && ( agitcheck() || agitcheck2() )) { .@len = getarraysize($App_Guilds); for( .@i=0; .@i <= .@len; .@i++ ) { if( getcharid(2) == $App_Guilds[.@i] ) set .@Guild_Check, .@Guild_Check+1; } if( .@Guild_Check < 1 ) { dispbottom "Your guild has not yet been approved, please contact the GMs"; sleep2 3000; warp "SavePoint",0,0; end; } if( !getcharid(2) ) { dispbottom "Sorry only members of a guild may enter a castle."; close; } end; OnInit: setarray .castles$[0], "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05", "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", "arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05", "schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05"; for ( .@i = 0; .@i < 30; .@i++ ) setmapflag .castles$[.@i], mf_loadevent; end; }
  13. Question, 2015 Prontera will only work with 2015 client correct?
  14. set #freebies, 1; Is that correct? Better to check both files for the variables used in checking.
  15. Your first NPC is good already. Now for your second one, copy what you did to your first NPC (if statement) and put it on your second NPC so they don't end up doing the quest for the second NPC twice. set #account, 1; Put this one on the last leg of your quest. Preferably when the player gets his reward.
  16. Yup that one. Though I still had to look for other sources. Sadly didn't save the links for them. But I have to say the database files are quite very messy and it's not even as accurate as it should be. You have tons of work ahead. Even mine aren't that close yet.
  17. Uh, sorry. Right now don't want to put it out since I'm not 100% sure that it is accurate. You can sift through the eAthena commits and see what changes they made. You can grab old NPCs and MOB spawn files off eAthena SVNs too.
  18. You'd have to configure it yourself. Sources are available through rAthena. I have mine but it's on episode one and all updates that are necessary up until Amatsu/Kunlun. Hard work really.
  19. setarray .Currency[1],513,513,513,513,513,513,513,513; First 513 means its the currency for .Shop1 and so on. setarray .Shop1[0],1202,5,1229,20; So for instance setarray .Currency[1],7179,513,513,513,513,513,513,513; then .Shop1 will accept pods, while the rest will accept whatever 513 is.
  20. Try this. You need to finish it first though. - itemshop custom_seller1 909..... - itemshop custom_seller2 909..... Coordinate_Here script Name_Shop_Here 437,{ mes "[NPC_NAME_HERE]"; mes "Which one do you want to open?"; @shop = select("Headgears:Supplies"); mes "[NPC_NAME_HERE"; mes "Happy shopping."; close2; deletearray @bought_nameid; callshop "custom_seller"+@shop,1; npcshopattach "custom_seller"+@shop; end; }
  21. Change .currency, the position of where you put the pod id corresponds to which shop it changes. Play around with the script and see how it works, best way to test lol. Don't be afraid to change something, part of learning too.
  22. Just add the items on the monster item drop (mob_db.txt) Or use this one - script PODS -1,{ OnNPCKillEvent: if ( getmonsterinfo( killedrid, 22 ) ) { if(killedrid == (thanatos id) || killedrid == (tanee id)){ getitem 7179,100; //gives 100 pods } } end; } Note, script above is untested.
  23. Can you try to @item 50040? I think someone had trouble with item IDs past 50k.
  24. If it has the announce feature, then why not. I know quest shop has the announce feature. Or you can add the announce yourself, it's quite easy to add.
×
×
  • Create New...