-
Posts
1282 -
Joined
-
Last visited
-
Days Won
41
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Skorm
-
- script nocmd -1,{ OnAgitStart: while(set(.@a,.@a+1)<=.len) while(set(.@h,.@h+1)<=5) setmapflag(.maps$[.@a]+"_cas0"+.@h,mf_nocommand); end; OnAgitEnd: while(set(.@a,.@a+1)<=.len) while(set(.@h,.@h+1)<=5) removemapflag(.maps$[.@a]+"_cas0"+.@h,mf_nocommand); end; OnInit: setarray .maps$[1], "aldeg", "arug", "gefg", "payg", "prtg", "schg"; set .len, getarraysize(.maps$); } Don't edit the map array sould work as is.
-
Edit--
-
Whew-whew, Gratz, Mr. Em.
-
Request Script That Give Item Monthly Or Daily
Skorm replied to Checkmate's question in Script Requests
prontera,155,181,5 script Sample 757,{ // Sun, Mon, Tue, Wed, Thu, Fri, Sat. setarray .ItemID[0], 512, 501, 502, 503, 504, 505, 506; setarray .Amount[0], 1 , 2 , 3 , 4 , 5 , 6 , 7 ; if( #MonthlyReward != gettime(4) ){ getitem .ItemID[gettime(4)],.Amount[gettime(4)]; set #MonthlyReward,gettime(4); mes "You have grant an item for this month."; }else{ mes "You cant take a reward again this month."; } close; } Say if you were to get your prize on Monday then wait until next Monday to try and get a prize again it wouldn't let you. -
//===== rAthena Script ======================================= //= HD Refiners //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= [Official Conversion] //= Refiners that use HD ores to refine equipment. Upon //= failure, the equipment is not destroyed; rather, its //= refine level decreases by 1. The success rate is identical //= to that for Enriched ores. //= - "Blacksmith Mighty Hammer" only refines from +7~9. //= - "Basta" only refines from +10 and up. //===== Additional Comments: ================================= //= 1.0 First version. [Euphy] //============================================================ // Blacksmith Mighty Hammer (+7~9) //============================================================ - script ::MightyHammer -1,{ disable_items; mes "[Blacksmith Mighty Hammer]"; mes "Unlike others, I am a blacksmith who refines a very limited number of items."; mes "I refine only items that are ^CC0000+7 to +9^000000."; next; mes "[Blacksmith Mighty Hammer]"; mes "My specialty is that even if my refining fails, the refine level decreases by 1 without losing the gear. Isn't it great?"; next; mes "[Blacksmith Mighty Hammer]"; mes "So lets kick this into overdrive, what d' ya say? What item do you want to refine?"; next; setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3"; set .@menu$,""; for(set .@i,1; .@i<=10; set .@i,.@i+1) set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Not equipped]")+":"; set .@part, select(.@menu$); if (!getequipisequiped(.@part)) { mes "[Blacksmith Mighty Hammer]"; switch(.@part) { case 1: mes "I'm a blacksmith, not a hairstylist."; break; case 2: mes "With my hammer, I will make you a star of the sky."; break; case 3: case 4: mes "Making artificial hands is not my specialty."; break; case 5: mes "Bring out the item so I can refine it!"; break; case 6: mes "Where is this foot odor coming from?"; break; case 7: case 8: mes "Where is the accessory?"; break; case 9: mes "What do you want me to refine?"; break; case 10: mes "Huh? What do you want me to do?"; break; } close; } if (getequiprefinerycnt(.@part) < 7) { mes "[Blacksmith Mighty Hammer]"; mes "I only handle items with refine levels from +7 to +9."; close; } L_Again: if (!getequipisenableref(.@part)) { mes "[Blacksmith Mighty Hammer]"; mes "This item can't be refined."; close; } if (getequiprefinerycnt(.@part) > 9) { mes "[Blacksmith Mighty Hammer]"; mes "I only handle items with refine levels from +7 to +9."; close; } switch(getequipweaponlv(.@part)) { default: case 0: set .@price,20000; set .@material,6241; //HD_Elunium break; case 1: case 2: case 3: case 4: set .@price,20000; set .@material,6240; //HD_Oridecon break; } mes "[Blacksmith Mighty Hammer]"; mes "In order to refine the gear you selected you need ^ff9999"+getitemname(.@material)+"^000000 and 20,000 zeny as a fee."; mes "Do you have them ready?"; next; if(select("Yes:No") == 2) { mes "[Blacksmith Mighty Hammer]"; mes "I will wait until you are ready."; close; } if (getequippercentrefinery(.@part) < 100) { mes "[Blacksmith Mighty Hammer]"; mes "It looks like this item will likely fail to be refined."; mes "Well, even if it fails, it only decreases by 1 refine level."; mes "Would you like to continue refining?"; next; if(select("Yes:No") == 2) { mes "[Blacksmith Mighty Hammer]"; mes "Only those who overcome fear of failure will obtain a masterpiece."; close; } } if (countitem(.@material) == 0 || Zeny < .@price) { mes "[Blacksmith Mighty Hammer]"; mes "Didn't you just say you had everything ready?"; close; } delitem .@material,1; set Zeny, Zeny-.@price; mes "[Blacksmith Mighty Hammer]"; mes "Tac! Tac! Tac!"; if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) { successrefitem .@part; next; emotion e_no1; mes "[Blacksmith Mighty Hammer]"; mes "^0000FFThe sound refreshes my mind everytime I hear it.^000000"; mes "Shall we go again?"; next; if(select("Yes:No") & 2) { mes "[Blacksmith Mighty Hammer]"; mes "Only those who overcome fear of failure will obtain a masterpiece."; close; } goto L_Again; } downrefitem .@part; next; emotion e_omg; mes "[Blacksmith Mighty Hammer]"; mes "(hammering)"; mes "^ba0001By Odin's beard that was bad luck!!^000000"; mes "Well it degraded by 1, do you want to try and upgrade again?"; next; if(select("Yes:No") & 2) { mes "[Blacksmith Mighty Hammer]"; mes "Only those who overcome fear of failure will obtain a masterpiece."; close; } goto L_Again; } prt_in,59,54,3 duplicate(MightyHammer) Mighty Hammer#prt 826 morocc_in,65,30,3 duplicate(MightyHammer) Mighty Hammer#morocc 826 payon,148,176,3 duplicate(MightyHammer) Mighty Hammer#pay 826 alberta_in,16,56,3 duplicate(MightyHammer) Mighty Hammer#alb 826 yuno_in01,171,18,3 duplicate(MightyHammer) Mighty Hammer#yuno 826 ein_in01,22,82,3 duplicate(MightyHammer) Mighty Hammer#ein 826 lhz_in02,280,19,3 duplicate(MightyHammer) Mighty Hammer#lhz 826 It checks the first time you click the npc if it is +7 right but not if it goes down to +6 from him... Also does it still check for the +9 limit after you've refined?
-
I really like these kinds of topics. Edit--
-
Your problem may be related to that. I suggest to make a menu to give yours pets with a npc using makepet Extremely useful information had no idea.
-
activate pvp when X players are in a map.
Skorm replied to HristDead's question in Scripting Support
I've removed it from my last post. It was there because I didn't have the variables you were using for your parties, so I had to find the ID of the party I was in on each respective character. And you're welcome. -
Haha sorry about that it was a debug message T_T Thank you.
-
prontera,206,188,5 script GiveItem 100,{ if(getgmlevel()<10) end; mes .npc$; mes "Hi, I can give items out"; mes "even if the person isn't online O_O"; next; mes .npc$; mes "Please input the persons name."; input(.@a$); next; if(query_sql("SELECT `char_id`,`account_id` FROM `char` WHERE `name` = '"+.@a$+"'",.@char_id,.@account_id)) { if(!isloggedin(.@account_id)) { mes .npc$; mes "I've found ("+.@a$+")!"; mes "What would you like to give them?"; mes "(Input an Itemid)"; next; while(getiteminfo(.@a,2)<0) { input(.@a); dispbottom "Please enter a valid ID!"; } mes .npc$; mes "Now the amount you'd like to send."; input(.@; next; mes .npc$; query_sql("INSERT INTO `inventory` (`char_id`, `nameid`, `amount`, `equip`, `identify`) VALUES ("+.@char_id+", "+.@a+", "+.@b+", 0, 1)"); mes "Item sent!"; } else { mes .npc$; mes "This person seems to be"; mes "online right now."; mes "Would you like me to"; mes "Send the item anyways?"; next; if(select("Yes:No")&2) { mes .npc$; mes "Alright maybe next time"; close; } mes .npc$; mes "Ok input id of the desired item."; while(getiteminfo(.@a,2)<0) { input(.@a); dispbottom "Please enter a valid ID!"; } mes "Now the amount you'd like to send."; input(.@; next; mes .npc$; getitem(.@a,.@b,.@account_id); mes "Item sent!"; } } else { mes .npc$; mes "I can't seem to find that person check your spelling."; } close; OnInit: set .npc$, "[GiveItem]"; } Primitive.... but it's what you want... You could also use @mail or something...
-
activate pvp when X players are in a map.
Skorm replied to HristDead's question in Scripting Support
- script pvpon -1,{ OnPCLoadMapEvent: set .@usr_map$, strcharinfo(3); getpartymember $@TeamID1,1; getpartymember $@TeamID1,2; set .team1, $@partymembercount; copyarray .party_name_desu[0], $@partymemberaid[0],128; while(set(.@f,.@f+1)<=.team1) { if(getmapxy(.@map$,.@x,.@y,0,rid2name(.party_name_desu[.@f-1]))!=0) set .team1,.team1-1; if(.@map$==.@usr_map$) set(.@i,.@i+1); } getpartymember $@TeamID2,1; getpartymember $@TeamID2,2; set .team2, $@partymembercount; copyarray .party_name_desu2[0], $@partymemberaid[0],128; while(set(.@h,.@h+1)<=.team2) { if(getmapxy(.@map$,.@x,.@y,0,rid2name(.party_name_desu2[.@h-1]))!=0) set .team2,.team2-1; if(.@map$==.@usr_map$) { set(.@i,.@i+1); } } if(.@i >= 4 && .team1 >= 2 && .team2 >= 2) pvpon "guild_vs2"; end; OnPCDieEvent: if(strcharinfo(3)=="guild_vs2"&&getmapflag("guild_vs2",mf_pvp)) if(getcharid(1)==$@TeamID1) if(!(set(.team1,.team1-1))) { dispbottom "Party 2 Wins"; pvpoff "guild_vs2"; while(set(.@h,.@h+1)<=getarraysize(.party_name_desu2)) getitem 501,1,.party_name_desu2[.@h-1]; deletearray .party_name_desu[0],128; deletearray .party_name_desu2[0],128; } else if(getcharid(1)==$@TeamID2) if(!(set(.team2,.team2-1))) { dispbottom "Party 1 Wins"; pvpoff "guild_vs2"; while(set(.@h,.@h+1)<=getarraysize(.party_name_desu)) getitem 501,1,.party_name_desu[.@h-1]; deletearray .party_name_desu[0],128; deletearray .party_name_desu2[0],128; } } guild_vs2 mapflag loadevent Sorry forgot about ghost party members. -
activate pvp when X players are in a map.
Skorm replied to HristDead's question in Scripting Support
This is kinda primitive but... Edit-- -
Hmm I can't dispel Bragi at all... maybe it a renewal thing?
-
activate pvp when X players are in a map.
Skorm replied to HristDead's question in Scripting Support
Yes I've tested the above script and it appears to be working. Just thought of a MUCH better way to do this... - script pvpon -1,{ OnPCLoadMapEvent: set .@usr, getcharid(1); getpartymember $@TeamID1; set .@a, $@partymembercount; getpartymember $@TeamID2; set .@b, $@partymembercount; if(.@usr==$@TeamID1||.@usr==$@TeamID2) set(.i,.i+1); if(.i >= 4 && .@a >= 2 && .@b >= 2) pvpon "guild_vs2"; end; OnEventEnd: set(.i,0); pvpoff "guild_vs2"; } guild_vs2 mapflag loadevent You will need to reset the npc variable when the event is by calling... OnEventEnd Like: doevent "pvpon::OnEventEnd"; Edit- But I guess the same person could warp in twice with this method... could always save there information to an array and check it, but then again... they could always warp out after words. -
- script blah -1,{ OnPCDieEvent: sleep2 1000; while(.maps$[.@i++]!="") if(.maps$[.@i]==strcharinfo(3)) { recovery 0; warp .spaw$[.@i],.map_x[.@i],.map_y[.@i]; sleep2 3000; atcommand "@pvpoff"; } end; OnPCLoginEvent: warp "SavePoint",0,0; end; OnInit: setmapflag "prontera",mf_nosave; setarray .maps$[1], "prontera", "geffen", "izlude", "prt_fild01"; setarray .spaw$[1], "geffen", "prontera", "izlude", "prt_fild02"; setarray .map_x[1], 10, 15, 88, 13; setarray .map_y[1], 20, 16, 55, 12; } Alright last attempt lol. Otherwise you might have to search for the event where pvp is activated.
-
Move Bragi, and Idun to the top of the case stack and add break; after it like: case SC_POEMBRAGI: case SC_APPLEIDUN: break; case SC_WHISTLE: case SC_ASSNCROS: case SC_HUMMING: case SC_DONTFORGETME: case SC_FORTUNE: case SC_SERVICE4U: if( tsc->data[i]->val4 ) //val4 = out-of-song-area continue; break;
-
Wait... do you want it on or off?
-
- script blah -1,{ OnPCDieEvent: sleep2 1000; while(.maps$[.@i++]!="") if(.maps$[.@i]==strcharinfo(3)) { recovery 0; pvpoff .spaw$[.@i]; warp .spaw$[.@i],.map_x[.@i],.map_y[.@i]; } end; OnPCLoginEvent: warp "SavePoint",0,0; end; OnInit: setmapflag "prontera",mf_nosave; setarray .maps$[1], "prontera", "geffen", "izlude", "prt_fild01"; setarray .spaw$[1], "geffen", "prontera", "izlude", "prt_fild02"; setarray .map_x[1], 10, 15, 88, 13; setarray .map_y[1], 20, 16, 55, 12; } Maybe try that if it doesn't work... locate conf/mapflag/pvp.txt and comment the maps you don't want pvp on like: //pvp_y_1-1 mapflag pvp
-
Above prontera,150,182,5 script Ruzkie 106,{
-
You need to make a shop called Wii_Shop like: - shop Wii_Shop -1,501:50
-
Wait so... what you're saying is you don't want Bragi to be dispelled?
-
Edit-- Do you want it exclusive to pvp maps?
-
Hello, Chris, it's always good to see new introductions.