-
Posts
1282 -
Joined
-
Last visited
-
Days Won
41
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Everything posted by Skorm
-
I think this is happening because when you logout with it on you literally break the function because it's still looping and looking for the account, and being a function it doesn't spit out that information to the prompt. Meh I can remove character variables and instead make temporary npc variables for each account using the glasses. Alternativly we might just beable to unequipped them when the user logs out with the OnPCLogoutEvent label.
-
I was able to emulate that infinity loop you were talking about. I added some kind of insanity check lol I had a few sleep2 1; in there aswell and it wasn't doing it but I think I got the problem so I took them out.
-
Make sure you're grabbing my code from that same post after refreshing the page because I'm updating it as you find buggs. Also REMEMBER to restart your server after you added the code, because @reloadscripts is tricky with functions. Thanks. Also I think you're having problems because the OnEquipped area of the item script only runs when the item's equipped try moving it to the first section, but I might need to add something to avoid stack continuum error.
-
Hmm, how many players did you test it with? I updated the script a little bit the last loop wasn't running enough to remove all the icons, and you should stop double posting just update your existing post I refresh the page. Edit: I'm getting no infinity loop, and it is detecting players on the map previously. The only problem I seem to have is after warping off the map the red dots still exist from the previous map. but I know how to fix that as well.
-
Yeah It's fixed now the script wasn't running for a final time after the glasses were unequipped. Just added a second loop to fix the problem. Make sure you restart your server after implementing the new script. Thanks.
-
Post moved to answered post.
-
Probably not what I plan to do is just activate when you equipped the headgear and when you remove it, the markings will go away. No menu because bleh. I'll add that after I'm done if you still want it. Right now I'm just working out the best way to show the markings.
-
Lol I see where you're going with this. ^ Can't be called from a function because of the Timer I added to try and fix the blinking, but I'll remove that re-add the character variables and call it from a function inside an item. npc:fis 1 to activate 0 to disable. Edit: - script fis -1,{OnWhisperGlobal:if(!getgmlevel())end;getmapxy(.@N$,.@B,.@C,0);if(atoi(@whispervar0$)>0&&.@s>0) {dispbottom "Player View is already active!";end;} else if(!atoi(@whispervar0$)){set .@s,0;dispbottom "Closing View!";end;} else {set .@s,1;dispbottom "Activating View!";}while(.@V<$PlayerNumber&&.@s){set .@V,.@V+1;getmapxy(.@map$,.@x[.@V],.@y[.@V],0,rid2name(getd("$RecordAID"+.@V)));if( .@N$ == .@map$ ){viewpoint 1,.@x[.@V],.@y[.@V],.@V,0xFF0000;}if(.@V>=$PlayerNumber){sleep2 1;for(set .@i,1;.@i<$PlayerNumber;set .@i,.@i+1) viewpoint 2,.@x[.@i],.@y[.@i],.@i,0xFF0000;set .@V,0;}}end;} ^ much better way of doing it no more blinking . Sorry Forums keeps putting my code into one line. T_T
-
I forgot to remove some old parts it's working now. I'm going to make one that updates constantly though give me a sec.
-
I think only 3 of them can be on the map at once... but w/e.
-
Player gotta wait after 10 mins before finish item is made by the NPC?
Skorm replied to Currently's question in Script Requests
Oh lol changeif(gettimetick(0)>=#product){toif(gettimetick(0)>=#product&product>0){ I'm not really sure what you mean. -
Some people just flip floop them around untill it works... That might not be the problem though. When connecting with your normal subnet did your server spitout any errors? subnet: 255.255.255.0:lanip:lanip subnet: 255.255.255.0:wanip:wanip subnet: 255.0.0.0:lanip:lanip subnet: 255.0.0.0:wanip:wanip
-
Player gotta wait after 10 mins before finish item is made by the NPC?
Skorm replied to Currently's question in Script Requests
new_1-1,161,112,4 script Crafter 82,{ set @npc$,"[Craft]"; if(gettimetick(0)>=#product){ mes @npc$; mes "Oh! -Sorry I almost forgot- Here's Your Item!"; getitem 14607,1; set #product,0; close; } if(#product>=gettimetick(0)){ mes @npc$; mes "Hold on a second. I'm still making it!"; close; } if (#product == 0) { mes @npc$; mes "Do you want to cook ( 50 All Stats Food )?"; mes "Get me 10 Meat, 10 Honey, 10 Mastela Fruit."; next; if (countitem(517) < 10) goto miss; if (countitem(518) < 10) goto miss; if (countitem(522) < 10) goto miss; delitem 517,10; delitem 518,10; delitem 522,10; mes @npc$; mes "I see that you have all the items required!"; next; mes @npc$; mes "Please wait for at least 10 minutes in order for me to finish this item."; set #product,gettimetick(0)+600000; close; miss: mes @npc$; mes "Sorry, you dont have all the items required."; close; } } -
Requesting for When a MVP dead Respawn a treasure box
Skorm replied to hexor9's question in Script Requests
Yeah that's what I had in my mind, and it is a lot like DragonNest. I plan on using this script for my server in instances, and really big bosses. -
Hmm, Subnet should be 255.255.255.0, lan, lan. Everything else looks fine if that doesn't work you might want to make sure you're using the same client to connect as your players? By that I mean Exe packetversions etc. etc. The lag probably has to do with your computer or your connection. Most common house connections only allow 1mbit/per upload.
-
Requesting for When a MVP dead Respawn a treasure box
Skorm replied to hexor9's question in Script Requests
Hmm, alright I'm just trying to understand want you mean. LOL You want to use custom mobs? Yes you can PM me on rAthena. -
Requesting for When a MVP dead Respawn a treasure box
Skorm replied to hexor9's question in Script Requests
I guess you could call this convoluted mess a proof of concept. It's no where near optimized and it's running some pretty redundant systems, but hell, it works right? Lol function script timeleft__ { set .@left, getarg(0); if ( .@left <= 0 ) return getarg(0); set .@day, .@left / 86400; set .@hour, .@left % 86400 / 3600; set .@min, .@left % 3600 / 60; set .@sec, .@left % 60; return ( ( .@day )?.@day +" day ":"" )+( ( .@day || .@hour )?.@hour +" hour ":"" )+( ( .@day == 0 && ( .@hour || .@min ) )?.@min +" min ":"" )+( ( .@day || .@hour )?"":.@sec +" sec" ); } - script Spoilbox_dup -1,{ end; Onmvpdead: getmapxy .map$, .x, .y, 0; set .a,0; set .b,0; set .id,atoi(strnpcinfo(2)); if(getmobdrops(.mvpid[.id])) { set .count, $@MobDrop_count; copyarray .item[0],$@MobDrop_item[0],.count; copyarray .rate[0],$@MobDrop_rate[0],.count; for( set .@i,0; .@i < .count; set .@i,.@i +1 ) { if(((.rate[.@i]/100)*.srate)>100){ set .drops[.@b],.item[.@i]; set .droprs[.@b],((.rate[.@i]/100)*.srate); set .@b,.@b+1; } else if(.rate[.@i]*.srate>99){ if(!rand((100/((.rate[.@i]/100)*.srate))-1)){ set .drops[.@b],.item[.@i]; set .droprs[.@b],((.rate[.@i]/100)*.srate); set .@b,.@b+1; } } else if(.rate[.@i]*.scardrate<99){ if(!(rand((100/((.rate[.@i]*.scardrate)%100))*100)-1)){ set .drops[.@b],.item[.@i]; set .droprs[.@b],((.rate[.@i]/100)*.scardrate); set .@b,.@b+1; } } } } else { end; } if(strcharinfo(1)==""){ goto Alone; } deletearray $@partymemberaid[0],128; getpartymember getcharid(1),1; getpartymember getcharid(1),2; set .@count, $@partymembercount; set .count,0; copyarray .@party[0],$@partymemberaid[0],.@count; copyarray .@cparty[0],$@partymembercid[0],.@count; for( set .@i,0; .@i < .@count; set .@i,.@i +1 ) { getmapxy(.@map$,.@x,.@y,0,rid2name(.@party[.@i])); if(.@map$==strcharinfo(3)) set .@p,.@p+1; } if(.@p<2) goto Alone; for ( set .@i, 0; .@i < .@count; set .@i, .@i +1 ){ if(isloggedin(.@party[.@i],.@cparty[.@i])){ set .party[.count],.@party[.@i]; set .count, .count +1 ; } } if(.count<2) goto Alone; movenpc strnpcinfo(0), .x, .y; restart: setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer; set .loop, .tlimit; while ( .loop ) { delwaitingroom strnpcinfo(0); waitingroom callfunc("timeleft__", .loop ), 0; set .loop, .loop -1; sleep2 1000; } if(.a<.count){ set .a,.a+1; npctalk strcharinfo(0)+" has taken to long!"; getmapxy .@map$, .@x, .@y, 0; warp .@map$,.@x,.@y; while(.b<getarraysize(.drops)){ setd ".partyroll"+.b+"["+.a+"]",0; set .b,.b+1; } goto restart; } end; OnTimer1000: while(.a<.count){ detachrid; attachrid(.party[.a]); set .b,0; while(.b<getarraysize(.drops)){ if((playerattached())&&strcharinfo(3)==.map$) { L_lo: if(.droprs[.b]>.ratelimit&&.ratelimit>0) { setd ".partyroll"+.b+"["+.a+"]",0; } else { select("============(^0000FF"+getitemname(.drops[.b])+"^000000)===============:-Roll:-Pass"); if(!((@menu)-1)||@menu>3) goto L_lo; if(@menu==2){ setd ".partyroll"+.b+"["+.a+"]",rand(100); npctalk strcharinfo(0)+" rolled a ["+getd(".partyroll"+.b+"["+.a+"]")+"] on "+getitemname(.drops[.b])+"."; dispbottom "You rolled a ["+getd(".partyroll"+.b+"["+.a+"]")+"] on "+getitemname(.drops[.b])+"."; } else { setd ".partyroll"+.b+"["+.a+"]",0; npctalk strcharinfo(0)+" passed a on "+getitemname(.drops[.b])+"."; dispbottom "You passed a on "+getitemname(.drops[.b])+"."; } } set .loop, 60; } set .b,.b+1; } set .a,.a+1; } //Find Highest Bawler. for (set .@i,0; .@i < getarraysize(.party); set .@i,.@i+1){ for(set .@s,0; .@s < getarraysize(.drops); set .@s,.@s+1){ if(getd(".partyroll"+.@s+"["+.@i+"]")>getd(".wpartyroll"+.@s)) { setd ".wpartyroll"+.@s,getd(".partyroll"+.@s+"["+.@i+"]"); setd ".wrid"+.@s,.party[.@i]; } } } //Distribute Prize. for(set .@s,0; .@s < getarraysize(.drops); set .@s,.@s+1){ detachrid; attachrid(getd(".wrid"+.@s)); if(getd(".wpartyroll"+.@s)){ npctalk strcharinfo(0)+" won ["+getitemname(.drops[.@s])+"]."; getitem .drops[.@s],1; } else { makeitem .drops[.@s],1,.map$,.x,.y; } } //Warp everyone so they aren't stuck anymore. for (set .@i,0; .@i < getarraysize(.party); set .@i,.@i+1){ detachrid; attachrid(.party[.@i]); getmapxy .@map$, .@x, .@y, 0; warp .@map$,.@x,.@y; } stopnpctimer; delwaitingroom strnpcinfo(0); movenpc strnpcinfo(0), 0,0; end; Alone: for(set .@s,0; .@s < getarraysize(.drops); set .@s,.@s+1){ getitem .drops[.@s],1; } delwaitingroom strnpcinfo(0); movenpc strnpcinfo(0), 0,0; end; OnInit: if ( strnpcinfo(2) == "" ) { //=-=-=-=-=-=Configuration=-=-=-=-=-=-= setarray .mvpid[1], 1871,1872,1719,1492,1147,1688,1583,2068,2156,2087,2165,1623,1389,1046,1272,1115,1046,1147,1272,1418,1157,2202,1685,1734,1658,1630,1038,1511,1885,1751,1150,1039,1086,1768,1832,1112,1312,1251,2131,1087,1190,1252,1059,1159,1917,1115,1785,1785,1785,1785; // MVP ids make sure each id corresponds to the duplicated npcs and maps. set .srate,50; // Server Drop rates set .scardrate,2; // Server card rate set .tlimit,60; // Time limit before skip player roll in seconds. set .ratelimit,0; // Ignores items dropped with rates higher then this value- Ignored items will be dropped by npc after rolls are over. 0 = off //=-=-=-=-=-=-=Skorm=-=-=-=-=-=-=-=-=-= //Credits to unknown artist for original //File architecture. //Thanks to Hexor9 for the idea. <3 } setmapflag strnpcinfo(4),mf_nomvploot; end; } prt_fild08,175,352,1,1 boss_monster Metaling 1613,1,1,1,"Spoilbox#1_mvp::Onmvpdead" prt_fild08,0,0,0 duplicate(Spoilbox_dup) Spoilbox#1_mvp 801 abbey03,0,0,0 duplicate(Spoilbox_dup) Spoilbox#2_mvp 801 abyss_03,0,0,0 duplicate(Spoilbox_dup) Spoilbox#3_mvp 801 ama_dun03,0,0,0 duplicate(Spoilbox_dup) Spoilbox#4_mvp 801 anthell02,0,0,0 duplicate(Spoilbox_dup) Spoilbox#5_mvp 801 ayo_dun02,0,0,0 duplicate(Spoilbox_dup) Spoilbox#6_mvp 801 beach_dun,0,0,0 duplicate(Spoilbox_dup) Spoilbox#7_mvp 801 bra_dun02,0,0,0 duplicate(Spoilbox_dup) Spoilbox#8_mvp 801 dew_dun01,0,0,0 duplicate(Spoilbox_dup) Spoilbox#9_mvp 801 dic_dun02,0,0,0 duplicate(Spoilbox_dup) Spoilbox#10_mvp 801 dic_dun03,0,0,0 duplicate(Spoilbox_dup) Spoilbox#11_mvp 801 ein_dun02,0,0,0 duplicate(Spoilbox_dup) Spoilbox#12_mvp 801 gef_dun01,0,0,0 duplicate(Spoilbox_dup) Spoilbox#13_mvp 801 gef_dun02,0,0,0 duplicate(Spoilbox_dup) Spoilbox#14_mvp 801 gl_chyard,0,0,0 duplicate(Spoilbox_dup) Spoilbox#15_mvp 801 gld_dun01,0,0,0 duplicate(Spoilbox_dup) Spoilbox#16_mvp 801 gld_dun02,0,0,0 duplicate(Spoilbox_dup) Spoilbox#17_mvp 801 gld_dun03,0,0,0 duplicate(Spoilbox_dup) Spoilbox#18_mvp 801 gld_dun04,0,0,0 duplicate(Spoilbox_dup) Spoilbox#19_mvp 801 gon_dun03,0,0,0 duplicate(Spoilbox_dup) Spoilbox#20_mvp 801 in_sphinx5,0,0,0 duplicate(Spoilbox_dup) Spoilbox#21_mvp 801 iz_dun05,0,0,0 duplicate(Spoilbox_dup) Spoilbox#22_mvp 801 jupe_core,0,0,0 duplicate(Spoilbox_dup) Spoilbox#23_mvp 801 kh_dun02,0,0,0 duplicate(Spoilbox_dup) Spoilbox#24_mvp 801 lhz_dun02,0,0,0 duplicate(Spoilbox_dup) Spoilbox#25_mvp 801 lou_dun03,0,0,0 duplicate(Spoilbox_dup) Spoilbox#26_mvp 801 moc_pryd04,0,0,0 duplicate(Spoilbox_dup) Spoilbox#27_mvp 801 moc_pryd06,0,0,0 duplicate(Spoilbox_dup) Spoilbox#28_mvp 801 mosk_dun03,0,0,0 duplicate(Spoilbox_dup) Spoilbox#29_mvp 801 odin_tem03,0,0,0 duplicate(Spoilbox_dup) Spoilbox#30_mvp 801 pay_dun04,0,0,0 duplicate(Spoilbox_dup) Spoilbox#31_mvp 801 prt_maze03,0,0,0 duplicate(Spoilbox_dup) Spoilbox#32_mvp 801 prt_sewb4,0,0,0 duplicate(Spoilbox_dup) Spoilbox#33_mvp 801 ra_san05,0,0,0 duplicate(Spoilbox_dup) Spoilbox#34_mvp 801 thor_v03,0,0,0 duplicate(Spoilbox_dup) Spoilbox#35_mvp 801 treasure02,0,0,0 duplicate(Spoilbox_dup) Spoilbox#36_mvp 801 tur_dun04,0,0,0 duplicate(Spoilbox_dup) Spoilbox#37_mvp 801 xmas_dun02,0,0,0 duplicate(Spoilbox_dup) Spoilbox#38_mvp 801 1@mist,0,0,0 duplicate(Spoilbox_dup) Spoilbox#39_mvp 801 gef_fild10,0,0,0 duplicate(Spoilbox_dup) Spoilbox#40_mvp 801 gef_fild14,0,0,0 duplicate(Spoilbox_dup) Spoilbox#41_mvp 801 xmas_fild01,0,0,0 duplicate(Spoilbox_dup) Spoilbox#42_mvp 801 mjolnir_04,0,0,0 duplicate(Spoilbox_dup) Spoilbox#43_mvp 801 moc_fild17,0,0,0 duplicate(Spoilbox_dup) Spoilbox#44_mvp 801 moc_fild22,0,0,0 duplicate(Spoilbox_dup) Spoilbox#45_mvp 801 pay_fild11,0,0,0 duplicate(Spoilbox_dup) Spoilbox#46_mvp 801 ra_fild03,0,0,0 duplicate(Spoilbox_dup) Spoilbox#47_mvp 801 ra_fild04,0,0,0 duplicate(Spoilbox_dup) Spoilbox#48_mvp 801 ve_fild01,0,0,0 duplicate(Spoilbox_dup) Spoilbox#49_mvp 801 ve_fild02,0,0,0 duplicate(Spoilbox_dup) Spoilbox#50_mvp 801 Notes:I added this little test Metaling you can remove it. if you want to add more monsters like the mvps, just make sure you add them like: abbey02,236,78,21,18 boss_monster Fallen Bishop Hibram 1871,1,7200000,600000,"Spoilbox#1_mvp::Onmvpdead" in order with the .mvpid[1] array so that "#_mvp" matches with the correct spawn for that mvp, and if you do use this make sure to delete the old spawns in your npc/mobs folder. The npc can only handle 1 MVP event death per map. Information: This npc will remove mvp drops from any map its duplicated to, and instead once the mvp is killed this emulates the original drops of that mvp and distributes them with dice rolls among the party members. If the user has no party or party members are on a different map all loot goes to the user who killed the MVP. After you've finished clicking "Roll" the npc gives the next person 60 seconds to roll on all their drops. If they fail to roll they will be skipped. That's pretty much it, thanks. Edit: First version I forgot to add a check for offline partymembers with the same accountid. It's added now. Video: -
cmd_in02,181,98,2 script Dicer 57,{ set @betzeny1,0; set @betnum,5; L_main: mes "[Dicer]"; mes "Do you wanna check your luck with dices?"; next; menu "Play",L_play,"How to play",L_info,"Go away",L_go; L_go: mes "[Dicer]"; mes "We're not joking here! Go away if you don't want to play!."; close; L_info: mes "[Dicer]"; mes "The Dices Game is a very simple game. The game allows you and me to throw 3 dices. Whoever gets a higher total number wins."; next; goto L_main; L_play: mes "[Dicer]"; mes "How many Poring Coins do you want to bet?"; mes "(maximum bet: 10)"; input(@betzeny1); if(@betzeny1<=0){ next; goto L_go; } if(@betzeny1>10){ mes "Sorry but the bet limit is 10 Poring Coins."; close; } next; if(countitem(7539)<@betzeny1){ mes "[Dicer]"; emotion 20; mes "I'm sorry, but you don't have enough Poring Coins to make that bet."; close; } set @bet, @betzeny1; set @dea1, rand(1,6); set @dea2, rand(1,6); set @dea3, rand(1,6); set @pla1, rand(1,6); set @pla2, rand(1,6); set @pla3, rand(1,6); set @deatot, @dea1+@dea2+@dea3; set @platot, @pla1+@pla2+@pla3; mes "[Dicer]"; mes "I will be the first one to roll the dices,and after that you will throw them.I am feeling lucky today, so you better go away before I take every Poring Coin you have."; next; mes "[^0080FFDicer 1st Turn^000000]"; mes "Throwing first dice!"; mes ".....roll.....roll....roll...."; emotion 58; mes " "; mes "First throw: ^0080FF"+@dea1+" ^000000"; next; mes "[^0080FFDicer 2nd Turn^000000]"; mes "Throwing second dice!"; emotion 58; mes ".....roll.....roll....roll...."; mes " "; mes "Second throw: ^0080FF"+@dea2+" ^000000"; next; mes "[^0080FFDicer 3rd Turn^000000]"; mes "Throwing third dice!"; emotion 58; mes ".....roll.....roll....roll...."; mes " "; mes "Third throw: ^0080FF"+@dea3+" ^000000"; next; mes "[Dicer]"; mes "Now it's your turn to throw the dices.I bet you can't get higher numbers then me."; next; mes "[^0080FFPlayer 1st Turn^000000]"; mes "Throwing first dice!"; mes ".....roll.....roll....roll...."; emotion 58; mes " "; mes "First throw: ^0080FF"+@pla1+" ^000000"; next; mes "[^0080FFPlayer 2nd Turn^000000]"; mes "Throwing second dice!"; emotion 58; mes ".....roll.....roll....roll...."; mes " "; mes "Second throw: ^0080FF"+@pla2+" ^000000"; next; mes "[^0080FFPlayer 3rd Turn^000000]"; mes "Throwing third dice!"; emotion 58; mes ".....roll.....roll....roll...."; mes " "; mes "Third throw: ^0080FF"+@pla3+" ^000000"; next; mes "[Dicer]"; mes "Let's look at our total numbers:"; mes " "; mes "Dicer Total: ^0080FF"+@deatot+" ^000000."; mes "Player Total: ^0080FF"+@platot+" ^000000."; next; if (@platot < @deatot) goto L_lose; if (@platot == @deatot) goto L_again; if (@platot > @deatot && @platot == @numg) goto L_win2; if (@platot > @deatot) goto L_win1; L_lose: mes "[Dicer]"; delitem 7539, @bet; emotion 39; mes "I got a higher number!!!"; mes "See I told you nobody can beat me!"; mes " "; mes "You lost ^0080FF"+@bet+"^000000 Poring Coins."; next; goto L_againa; L_again: mes "[Dicer]"; emotion 54; mes "It seems it's a draw.Let's play again."; next; goto L_play; L_win1: mes "[Dicer]"; getitem 7539, @bet; emotion 36; mes "I can't belive I lost. Here take your money."; mes " "; mes "You won ^0080FF"+@bet*2+"^000000 Poring Coins."; next; goto L_againa; L_win2: mes "[Dicer]"; getitem 7539, @bet*3; emotion 36; mes "You even guessed the total number you got.I can't belive I lost. Here is your money."; mes " "; mes "You won ^0080FF"+@bet*3+"^000000 Poring Coins."; next; goto L_againa; L_againa: mes "[Dicer]"; mes "Would you like to play again?"; next; menu "Yes",L_play,"No",L_go; }
-
Untested etc. etc. cmd_in02,181,98,2 script Dicer 57,{ set @betzeny1,0; set @betnum,5; L_main: mes "[Dicer]"; mes "Do you wanna check your luck with dices?"; next; menu "Play",L_play,"How to play",L_info,"Go away",L_go; L_go: mes "[Dicer]"; mes "We're not joking here! Go away if you don't want to play!."; close; L_info: mes "[Dicer]"; mes "The Dices Game is a very simple game. The game allows you and me to throw 3 dices. Whoever gets a higher total number wins."; next; goto L_main; L_play: mes "[Dicer]"; mes "How many Poring Coins do you want to bet?"; mes "(maximum bet: 10)"; while(@betzeny1>10||@betzeny1<1) input(@betzeny1); next; if(countitem(7539)<@betzeny1){ mes "[Dicer]"; emotion 20; mes "I'm sorry, but you don't have enough Poring Coins to make that bet."; close; } set @bet, @betzeny1; mes "[Dicer]"; mes "Would you like to try to increase your win by trying to guess the number you will get?"; mes "It will cost you another ^0080FF"+@betnum+"^000000 Poring Coins."; next; menu "Yes",L_gamec,"No",L_gameb; L_gamec: if(countitem(7539)<@betnum + @bet){ mes "[Dicer]"; emotion 20; mes "I'm sorry, but you don't have enough Poring Coins to make that bet."; close; } mes "[Dicer]"; mes "Please input the number you think you will get (3-18)."; input @numg; if(@numg<3) message strcharinfo(0),"Number is too low, input again."; if(@numg>18) message strcharinfo(0),"Number is too high, input again."; if(@numg<3||@numg>18) goto L_gamec; delitem 7539, @betnum; next; set @dea1, rand(1,6); set @dea2, rand(1,6); set @dea3, rand(1,6); set @pla1, rand(1,6); set @pla2, rand(1,6); set @pla3, rand(1,6); set @deatot, @dea1+@dea2+@dea3; set @platot, @pla1+@pla2+@pla3; mes "[Dicer]"; mes "I will be the first one to roll the dices,and after that you will throw them.I am feeling lucky today, so you better go away before I take every Poring Coin you have."; next; mes "[^0080FFDicer 1st Turn^000000]"; mes "Throwing first dice!"; mes ".....roll.....roll....roll...."; emotion 58; mes " "; mes "First throw: ^0080FF"+@dea1+" ^000000"; next; mes "[^0080FFDicer 2nd Turn^000000]"; mes "Throwing second dice!"; emotion 58; mes ".....roll.....roll....roll...."; mes " "; mes "Second throw: ^0080FF"+@dea2+" ^000000"; next; mes "[^0080FFDicer 3rd Turn^000000]"; mes "Throwing third dice!"; emotion 58; mes ".....roll.....roll....roll...."; mes " "; mes "Third throw: ^0080FF"+@dea3+" ^000000"; next; mes "[Dicer]"; mes "Now it's your turn to throw the dices.I bet you can't get higher numbers then me."; next; mes "[^0080FFPlayer 1st Turn^000000]"; mes "Throwing first dice!"; mes ".....roll.....roll....roll...."; emotion 58; mes " "; mes "First throw: ^0080FF"+@pla1+" ^000000"; next; mes "[^0080FFPlayer 2nd Turn^000000]"; mes "Throwing second dice!"; emotion 58; mes ".....roll.....roll....roll...."; mes " "; mes "Second throw: ^0080FF"+@pla2+" ^000000"; next; mes "[^0080FFPlayer 3rd Turn^000000]"; mes "Throwing third dice!"; emotion 58; mes ".....roll.....roll....roll...."; mes " "; mes "Third throw: ^0080FF"+@pla3+" ^000000"; next; mes "[Dicer]"; mes "Let's look at our total numbers:"; mes " "; mes "Dicer Total: ^0080FF"+@deatot+" ^000000."; mes "Player Total: ^0080FF"+@platot+" ^000000."; next; if (@platot < @deatot) goto L_lose; if (@platot == @deatot) goto L_again; if (@platot > @deatot && @platot == @numg) goto L_win2; if (@platot > @deatot) goto L_win1; L_lose: mes "[Dicer]"; delitem 7539, @bet; emotion 39; mes "I got a higher number!!!"; mes "See I told you nobody can beat me!"; mes " "; mes "You lost ^0080FF"+@bet+"^000000 Poring Coins."; next; goto L_againa; L_again: mes "[Dicer]"; emotion 54; mes "It seems it's a draw.Let's play again."; next; goto L_play; L_win1: mes "[Dicer]"; getitem 7539, @bet*2; emotion 36; mes "I can't belive I lost. Here take your money."; mes " "; mes "You won ^0080FF"+@bet*2+"^000000 Poring Coins."; next; goto L_againa; L_win2: mes "[Dicer]"; getitem 7539, @bet*3; emotion 36; mes "You even guessed the total number you got.I can't belive I lost. Here is your money."; mes " "; mes "You won ^0080FF"+@bet*3+"^000000 Poring Coins."; next; goto L_againa; L_againa: mes "[Dicer]"; mes "Would you like to play again?"; next; menu "Yes",L_play,"No",L_go; }
-
I've added the 5min kill timer to the healing npcs. If you add them to any map they will kill the monsters if there is no players for 5min. Everything is tested and working with the latest version of rAthena. prontera,102,102,5 script Dead Branch Room 100,{ setarray $@maps$[1], "06guild_01", "06guild_08"; setarray .@price[1], 1000000, 1000000; for(set .@b,1; .@b < getarraysize($@maps$); set .@b,.@b + 1) { if(.@b==1){ set .@menu$, .@menu$ + "Public- "+((getmapusers($@maps$[.@b])>=30)?"^CD0000Closed^000000("+getmapusers($@maps$[.@b])+")":"^007700Open^000000("+getmapusers($@maps$[.@b])+") [z"+.@price[.@b]+"]")+":"; } else { set .@menu$, .@menu$ + "Private["+(.@b-1)+"]- "+((getmapusers(""+$@maps$[.@b]+"")>=5)?"^CD0000Closed^000000("+getmapusers($@maps$[.@b])+")":"^007700Open^000000("+getmapusers($@maps$[.@b])+") [z"+.@price[.@b]+"]")+":"; } } if(select(.@menu$)) { if(Zeny<.@price[@menu]){mes "I'm sorry but you don't have enough Zeny, please come back later."; close;} if(getmapusers($@maps$[@menu])<=30&&@menu==1){ set Zeny,Zeny-.@price[@menu]; set $@maps$,$@maps$[@menu]; setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer; warp $@maps$[@menu],0,0; end; } if(!getmapusers($@maps$[@menu])){ mes "Input a new password."; input($password$[@menu]); set Zeny,Zeny-.@price[@menu]; set $@maps$,$@maps$[@menu]; next; setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer; warp $@maps$[@menu],0,0; end; } if(getmapusers($@maps$[@menu])<=5&&@menu!=1) { mes "This room is password protected please input the password now."; input(@name$); if(@name$==$password$[@menu]){ set Zeny,Zeny-.@price[@menu]; set $@maps$,$@maps$[@menu]; mes "correct!"; next; setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer; warp $@maps$[@menu],0,0; end; } else { mes "Incorrect!"; close; } } else { mes "I'm sorry this room is full."; close; } } OnTimer3600000: if(strcharinfo(3)==$@maps$){ warp "prontera",0,0; end; } } 06guild_01,49,49,5 script Heal#h1-1::Heal 110,{ if((@h_last) && (getnpctimer(1))) goto L_doubleclick; set @h_last,1; percentheal 100,100; specialeffect 312; skilleffect 28,32767; sc_end SC_STONE; sc_end SC_FREEZE; sc_end SC_STUN; sc_end SC_SLEEP; sc_end SC_POISON; sc_end SC_CURSE; sc_end SC_SILENCE; sc_end SC_CONFUSION; sc_end SC_BLIND; sc_end SC_BLEEDING; sc_end SC_DPOISON; dispbottom "HP/SP fully restored."; if(!getnpctimer(1)){setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer;} end; L_doubleclick: killmonsterall strcharinfo(3); npctalk "I've killed all monsters."; end; OnTimer1000: set @h_last,0; stopnpctimer; end; OnInit: while(1){ sleep 1000 * 60 * 5; if(!getusers(8)&&mobcount(strnpcinfo(4))){killmonsterall strnpcinfo(4);} } } // --------- NPC Clones --------- 06guild_08,49,49,5 duplicate(Heal) Heal#h1-2 742
-
Prontera no vending and no chat room area
Skorm replied to freyreuxine13's question in Script Requests
Really this is something you could've just googled. http://lmgtfy.com/?q=prontera+setcell+no+vend -
The script really wasn't optimal to begin with. It uses a god awful amount of variables... Bleh all over the place. Anyways I've modified my above post to support random between 1-3 BBs. Also I changed the way it closes, because that might've been giving you trouble, but I noticed in your first screenshot it says you've gotten 0 BBs. You wouldn't happen to've changed it in anyway?