-
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
-
Maybe related to this? warp ignore walk
-
Your request is similiar to Euphy's Item rewards
-
Misc. a typo in Emistry's script for( set .@x,0; .@i < .castle_size; set .@x,.@x + 1 )// .@i -> .@x for( set .@y,0; .@i < .@today_map_size; set .@y,.@y + 1 )// .@i -> .@y
-
In both script the variable to check if the reward is given is reseted each end of woe. If there is woe everyday in different castle then they could claim the reward even if there wasn't woe in this castle
-
this error appear on eathena, not in the latest rathena revision You can make a normal shop by script command. Here a sample // dummy shop - shop Egg Shop 703,501:-1 prontera,160,172,7 script special egg 56,{ callshop "Egg Shop",1; end; OnBuyItem: set .@size, getarraysize( @bought_nameid ); while ( .@i < .@size ) { for ( set .@j, 0; .@j < .size_id; set .@j, .@j +1 ) if ( @bought_nameid[.@i] == .item_id[.@j] ) break; set .@total, .@total + .price[.@j] * @bought_quantity[.@i]; set .@i, .@i +1; } if ( Zeny < .@total ) { dispbottom "you don't have enough zeny"; end; } set Zeny, Zeny - .@total; for ( set .@j, 0; .@j < .@size; set .@j, .@j +1 ) makepet @bought_nameid[.@j]; end; OnInit: setarray .item_id, 9001, 9002;// yours pet egg setarray .price, 20, 20;// yours pet egg price set .size_id, getarraysize( .item_id); npcshopdelitem "Egg Shop",501; for ( ; .@i < .size_id; set .@i, .@i +1) npcshopadditem "Egg Shop",.item_id[.@i],.price[.@i]; npcshopattach "Egg Shop"; end; } your setting OnInit: setarray .item_id, 9001, 9002;// yours pet egg setarray .price, 20, 20;// yours pet egg price
-
prontera,150,150,5 script sample 56,{ if ( select( "register", "delete the list" ) == 2 ) { deletearray .aid_reg, .size_reg; deletearray .cid_reg, .size_reg; dispbottom "list now empty"; } else { .@myaid = getcharid(3); while( .@i < .size_reg && .aid_reg[.@i] != .@myaid ) .@i++; if ( .@i != .size_reg ) { dispbottom "already register"; end; } .aid_reg[.size_reg] = .@myaid;// account id .cid_reg[.size_reg] = getcharid(0);// charid .size_reg++; dispbottom "you are now on the list"; } end; } it's a sample. The variable to register depends on the event you want to make
-
bMagicSubRace doesn't exist. I suggest bonus2 bAddMDefClass,9,20; 20% of magical damage reduction against wizard
-
guild_vs1 //Made by AnnieRuru - script custom_bg#control1 -1,{ OnInit: set .minplayer2start, 2; // minimum player to start setarray .rewarditem, 12248, 2, // reward to the winning team 12248, 1; // reward to the losing team set .startingscore, 20; // score at start set .eventlasting, 120; // event last 120 seconds or the system abort itself end; onstart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end; set .red, waitingroom2bg( "guild_vs1", 8,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead", .rednpcname$ ); copyarray .team1aid[.@i], $@arenamembers[.@i], $@arenamembersnum; set .blue, waitingroom2bg( "guild_vs1", 91,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead", .bluenpcname$ ); copyarray .team2aid[.@i], $@arenamembers[.@i], $@arenamembersnum; delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; bg_warp .red, "guild_vs1", 8,50; bg_warp .blue, "guild_vs1", 91,50; set .score[1], .startingscore; set .score[2], .startingscore; bg_updatescore "guild_vs1", .score[1], .score[2]; sleep .eventlasting * 1000; if ( .score[1] == .score[2] ) announce "Deathmatch Ground : Draw !", 0; else if ( .score[1] > .score[2] ) { announce "Deathmatch Ground : Red Team Wins !", 0; callsub L_reward, 1, 0; callsub L_reward, 2, 2; } else if ( .score[1] < .score[2] ) { announce "Deathmatch Ground : Blue Team Wins !", 0; callsub L_reward, 2, 0; callsub L_reward, 1, 2; } OnTimer50000: announce "Deathmatch Ground is now open for another match @ prontera 156 170 !",0; bg_warp .red, "prontera", 156,191; bg_warp .blue, "prontera", 156,191; bg_destroy .red; bg_destroy .blue; donpcevent .rednpcname$ +"::OnInit"; donpcevent .bluenpcname$ +"::OnInit"; end; L_reward: set .@size, getarraysize( getd(".team"+ getarg(0) +"aid") ); for ( set .@i, 0; .@i < .@size; set .@i, .@i +1 ) if ( isloggedin( getd(".team"+ getarg(0) +"aid["+ .@i +"]" ) ) ) getitem .rewarditem[ getarg(1) ], .rewarditem[ getarg(1) +1 ], getd(".team"+ getarg(0) +"aid["+ .@i +"]" ); return; OnredDead: callsub L_dead, 1; OnblueDead: callsub L_dead, 2; L_dead: set .score[ getarg(0) ], .score[ getarg(0) ] -1; bg_updatescore "guild_vs1", .score[1], .score[2]; if ( .score[ getarg(0) ] == 0 ) awake strnpcinfo(0); sleep2 1500; percentheal 100,100; end; OnredQuit: callsub L_quit, 1, .red; OnblueQuit: callsub L_quit, 2, .blue; L_quit: percentheal 100, 100; if ( bg_get_data( getarg(1), 0) ) end; set .score[ getarg(0) ], 0; awake strnpcinfo(0); end; } //RED TEAM prontera,152,157,5 script Deatchmatch Grounds#11 733,{ end; OnInit: waitingroom "Red Team", getvariableofnpc( .minplayer2start, "custom_bg#control1" ) +1, "custom_bg#control1::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control1" ); set getvariableofnpc( .rednpcname$, "custom_bg#control1" ), strnpcinfo(0); end; } //BLUE TEAM prontera,159,157,5 script Deathmatch Grounds#12 734,{ end; OnInit: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "custom_bg#control1" ) +1, "custom_bg#control1::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control1" ); set getvariableofnpc( .bluenpcname$, "custom_bg#control1" ), strnpcinfo(0); end; } guild_vs1 mapflag battleground 2 guild_vs1 mapflag nosave SavePoint guild_vs1 mapflag nowarp guild_vs1 mapflag nowarpto guild_vs1 mapflag noteleport guild_vs1 mapflag nomemo guild_vs1 mapflag nopenalty guild_vs1 mapflag nobranch guild_vs1 mapflag noicewall guild_vs2 //Made by AnnieRuru - script custom_bg#control2 -1,{ OnInit: set .minplayer2start, 2; // minimum player to start setarray .rewarditem, 12248, 2, // reward to the winning team 12248, 1; // reward to the losing team set .startingscore, 20; // score at start set .eventlasting, 120; // event last 120 seconds or the system abort itself end; onstart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end; set .red, waitingroom2bg( "guild_vs2", 8,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead", .rednpcname$ ); copyarray .team1aid[.@i], $@arenamembers[.@i], $@arenamembersnum; set .blue, waitingroom2bg( "guild_vs2", 91,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead", .bluenpcname$ ); copyarray .team2aid[.@i], $@arenamembers[.@i], $@arenamembersnum; delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; bg_warp .red, "guild_vs2", 8,50; bg_warp .blue, "guild_vs2", 91,50; set .score[1], .startingscore; set .score[2], .startingscore; bg_updatescore "guild_vs2", .score[1], .score[2]; sleep .eventlasting * 1000; if ( .score[1] == .score[2] ) announce "Deathmatch Ground : Draw !", 0; else if ( .score[1] > .score[2] ) { announce "Deathmatch Ground : Red Team Wins !", 0; callsub L_reward, 1, 0; callsub L_reward, 2, 2; } else if ( .score[1] < .score[2] ) { announce "Deathmatch Ground : Blue Team Wins !", 0; callsub L_reward, 2, 0; callsub L_reward, 1, 2; } OnTimer50000: announce "Deathmatch Ground is now open for another match @ prontera 156 170 !",0; bg_warp .red, "prontera", 156,191; bg_warp .blue, "prontera", 156,191; bg_destroy .red; bg_destroy .blue; donpcevent .rednpcname$ +"::OnInit"; donpcevent .bluenpcname$ +"::OnInit"; end; L_reward: set .@size, getarraysize( getd(".team"+ getarg(0) +"aid") ); for ( set .@i, 0; .@i < .@size; set .@i, .@i +1 ) if ( isloggedin( getd(".team"+ getarg(0) +"aid["+ .@i +"]" ) ) ) getitem .rewarditem[ getarg(1) ], .rewarditem[ getarg(1) +1 ], getd(".team"+ getarg(0) +"aid["+ .@i +"]" ); return; OnredDead: callsub L_dead, 1; OnblueDead: callsub L_dead, 2; L_dead: set .score[ getarg(0) ], .score[ getarg(0) ] -1; bg_updatescore "guild_vs2", .score[1], .score[2]; if ( .score[ getarg(0) ] == 0 ) awake strnpcinfo(0); sleep2 1500; percentheal 100,100; end; OnredQuit: callsub L_quit, 1, .red; OnblueQuit: callsub L_quit, 2, .blue; L_quit: percentheal 100, 100; if ( bg_get_data( getarg(1), 0) ) end; set .score[ getarg(0) ], 0; awake strnpcinfo(0); end; } //RED TEAM prontera,162,157,5 script Deatchmatch Grounds 2#21 733,{ end; OnInit: waitingroom "Red Team", getvariableofnpc( .minplayer2start, "custom_bg#control2" ) +1, "custom_bg#control2::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control2" ); set getvariableofnpc( .rednpcname$, "custom_bg#control2" ), strnpcinfo(0); end; } //BLUE TEAM prontera,169,157,5 script Deathmatch Grounds 2#22 734,{ end; OnInit: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "custom_bg#control2" ) +1, "custom_bg#control2::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control2" ); set getvariableofnpc( .bluenpcname$, "custom_bg#control2" ), strnpcinfo(0); end; } guild_vs2 mapflag battleground 2 guild_vs2 mapflag nosave SavePoint guild_vs2 mapflag nowarp guild_vs2 mapflag nowarpto guild_vs2 mapflag noteleport guild_vs2 mapflag nomemo guild_vs2 mapflag nopenalty guild_vs2 mapflag nobranch guild_vs2 mapflag noicewall guild_vs3 //Made by AnnieRuru - script custom_bg#control3 -1,{ OnInit: set .minplayer2start, 2; // minimum player to start setarray .rewarditem, 12248, 2, // reward to the winning team 12248, 1; // reward to the losing team set .startingscore, 20; // score at start set .eventlasting, 120; // event last 120 seconds or the system abort itself end; onstart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end; set .red, waitingroom2bg( "guild_vs3", 8,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead", .rednpcname$ ); copyarray .team1aid[.@i], $@arenamembers[.@i], $@arenamembersnum; set .blue, waitingroom2bg( "guild_vs3", 91,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead", .bluenpcname$ ); copyarray .team2aid[.@i], $@arenamembers[.@i], $@arenamembersnum; delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; bg_warp .red, "guild_vs3", 8,50; bg_warp .blue, "guild_vs3", 91,50; set .score[1], .startingscore; set .score[2], .startingscore; bg_updatescore "guild_vs3", .score[1], .score[2]; sleep .eventlasting * 1000; if ( .score[1] == .score[2] ) announce "Deathmatch Ground : Draw !", 0; else if ( .score[1] > .score[2] ) { announce "Deathmatch Ground : Red Team Wins !", 0; callsub L_reward, 1, 0; callsub L_reward, 2, 2; } else if ( .score[1] < .score[2] ) { announce "Deathmatch Ground : Blue Team Wins !", 0; callsub L_reward, 2, 0; callsub L_reward, 1, 2; } OnTimer50000: announce "Deathmatch Ground is now open for another match @ prontera 156 170 !",0; bg_warp .red, "prontera", 156,191; bg_warp .blue, "prontera", 156,191; bg_destroy .red; bg_destroy .blue; donpcevent .rednpcname$ +"::OnInit"; donpcevent .bluenpcname$ +"::OnInit"; end; L_reward: set .@size, getarraysize( getd(".team"+ getarg(0) +"aid") ); for ( set .@i, 0; .@i < .@size; set .@i, .@i +1 ) if ( isloggedin( getd(".team"+ getarg(0) +"aid["+ .@i +"]" ) ) ) getitem .rewarditem[ getarg(1) ], .rewarditem[ getarg(1) +1 ], getd(".team"+ getarg(0) +"aid["+ .@i +"]" ); return; OnredDead: callsub L_dead, 1; OnblueDead: callsub L_dead, 2; L_dead: set .score[ getarg(0) ], .score[ getarg(0) ] -1; bg_updatescore "guild_vs3", .score[1], .score[2]; if ( .score[ getarg(0) ] == 0 ) awake strnpcinfo(0); sleep2 1500; percentheal 100,100; end; OnredQuit: callsub L_quit, 1, .red; OnblueQuit: callsub L_quit, 2, .blue; L_quit: percentheal 100, 100; if ( bg_get_data( getarg(1), 0) ) end; set .score[ getarg(0) ], 0; awake strnpcinfo(0); end; } //RED TEAM prontera,152,167,5 script Deatchmatch Grounds 3#31 733,{ end; OnInit: waitingroom "Red Team", getvariableofnpc( .minplayer2start, "custom_bg#control3" ) +1, "custom_bg#control3::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control3" ); set getvariableofnpc( .rednpcname$, "custom_bg#control3" ), strnpcinfo(0); end; } //BLUE TEAM prontera,159,167,5 script Deathmatch Grounds 3#32 734,{ end; OnInit: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "custom_bg#control3" ) +1, "custom_bg#control3::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control3" ); set getvariableofnpc( .bluenpcname$, "custom_bg#control3" ), strnpcinfo(0); end; } guild_vs3 mapflag battleground 2 guild_vs3 mapflag nosave SavePoint guild_vs3 mapflag nowarp guild_vs3 mapflag nowarpto guild_vs3 mapflag noteleport guild_vs3 mapflag nomemo guild_vs3 mapflag nopenalty guild_vs3 mapflag nobranch guild_vs3 mapflag noicewall guild_vs4 //Made by AnnieRuru - script custom_bg#control4 -1,{ OnInit: set .minplayer2start, 2; // minimum player to start setarray .rewarditem, 12248, 2, // reward to the winning team 12248, 1; // reward to the losing team set .startingscore, 20; // score at start set .eventlasting, 120; // event last 120 seconds or the system abort itself end; onstart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) end; set .red, waitingroom2bg( "guild_vs4", 8,50, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead", .rednpcname$ ); copyarray .team1aid[.@i], $@arenamembers[.@i], $@arenamembersnum; set .blue, waitingroom2bg( "guild_vs4", 91,50, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead", .bluenpcname$ ); copyarray .team2aid[.@i], $@arenamembers[.@i], $@arenamembersnum; delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; bg_warp .red, "guild_vs4", 8,50; bg_warp .blue, "guild_vs4", 91,50; set .score[1], .startingscore; set .score[2], .startingscore; bg_updatescore "guild_vs4", .score[1], .score[2]; sleep .eventlasting * 1000; if ( .score[1] == .score[2] ) announce "Deathmatch Ground : Draw !", 0; else if ( .score[1] > .score[2] ) { announce "Deathmatch Ground : Red Team Wins !", 0; callsub L_reward, 1, 0; callsub L_reward, 2, 2; } else if ( .score[1] < .score[2] ) { announce "Deathmatch Ground : Blue Team Wins !", 0; callsub L_reward, 2, 0; callsub L_reward, 1, 2; } OnTimer50000: announce "Deathmatch Ground is now open for another match @ prontera 156 170 !",0; bg_warp .red, "prontera", 156,191; bg_warp .blue, "prontera", 156,191; bg_destroy .red; bg_destroy .blue; donpcevent .rednpcname$ +"::OnInit"; donpcevent .bluenpcname$ +"::OnInit"; end; L_reward: set .@size, getarraysize( getd(".team"+ getarg(0) +"aid") ); for ( set .@i, 0; .@i < .@size; set .@i, .@i +1 ) if ( isloggedin( getd(".team"+ getarg(0) +"aid["+ .@i +"]" ) ) ) getitem .rewarditem[ getarg(1) ], .rewarditem[ getarg(1) +1 ], getd(".team"+ getarg(0) +"aid["+ .@i +"]" ); return; OnredDead: callsub L_dead, 1; OnblueDead: callsub L_dead, 2; L_dead: set .score[ getarg(0) ], .score[ getarg(0) ] -1; bg_updatescore "guild_vs4", .score[1], .score[2]; if ( .score[ getarg(0) ] == 0 ) awake strnpcinfo(0); sleep2 1500; percentheal 100,100; end; OnredQuit: callsub L_quit, 1, .red; OnblueQuit: callsub L_quit, 2, .blue; L_quit: percentheal 100, 100; if ( bg_get_data( getarg(1), 0) ) end; set .score[ getarg(0) ], 0; awake strnpcinfo(0); end; } //RED TEAM prontera,162,167,5 script Deathmatch Grounds 4#41 733,{ end; OnInit: waitingroom "Red Team", getvariableofnpc( .minplayer2start, "custom_bg#control4" ) +1, "custom_bg#control4::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control4" ); set getvariableofnpc( .rednpcname$, "custom_bg#control4" ), strnpcinfo(0); end; } //BLUE TEAM prontera,169,167,5 script Deathmatch Grounds 4#42 734,{ end; OnInit: waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "custom_bg#control4" ) +1, "custom_bg#control4::onstart", getvariableofnpc( .minplayer2start, "custom_bg#control4" ); set getvariableofnpc( .bluenpcname$, "custom_bg#control4" ), strnpcinfo(0); end; } guild_vs4 mapflag battleground 2 guild_vs4 mapflag nosave SavePoint guild_vs4 mapflag nowarp guild_vs4 mapflag nowarpto guild_vs4 mapflag noteleport guild_vs4 mapflag nomemo guild_vs4 mapflag nopenalty guild_vs4 mapflag nobranch guild_vs4 mapflag noicewall
-
or - script hibicus -1,{ function MobReward; OnInit:// setting // <mob id>, <itemid or variable>,<amount>, <itemid or variable>,<amount>... MobReward( 1002, 501,1, "#CASHPOINTS",5, 502,3 ); MobReward( 1003, 501,1, "#CASHPOINTS",5, 505,5, "#random_variable",1 ); MobReward( 1004, 501,1, "#CASHPOINTS",5 ); end; OnNPCKillEvent: .@mob_id = killedrid; if ( !compare( .concat_mobid$, .@mob_id +"" ) ) end;// not in the list .@party_id = getcharid(1); .@aid[.@count] = .@self_aid = getcharid(3);// killer index 0 .@count++; if ( .@party_id ) { .@map_killer$ = strcharinfo(3); getpartymember .@party_id,0; getpartymember .@party_id,1; getpartymember .@party_id,2; while( .@i < $@partymembercount ) { if ( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) && .@self_aid != $@partymemberaid[.@i] ) {// don't count killer if ( readparam( 5,$@partymembername$[.@i] ) && !getmapxy( .@map$, .@x, .@y, 0,$@partymembername$[.@i] ) && .@map$ == .@map_killer$ ) {// hp > 0 and same map .@aid[.@count] = $@partymemberaid[.@i]; .@count++;// count players online in party } } .@i++; } } .@ratio = 1000/.@count; for ( .@i = 0; .@i < .@count; .@i++ ) { .@size = getd( ".size_item_id_"+ .@mob_id ); if ( .@size ) {// give item reward for ( .@j = 0; .@j < .@size; .@j += 2 ) { .@itemid = getd( ".item_id_"+ .@mob_id +"["+ .@j +"]" ); .@amount = getd( ".amount_item_id_"+ .@mob_id +"["+ .@j +"]" ); if ( getd( ".@i_"+ .@itemid ) < .@amount ) {// amount already given .@amount2 = .@amount - getd( ".@i_"+ .@itemid );// rest .@r = ( .@i == .@count -1 ) ? .@amount2 : ( ( .@amount* .@ratio / 1000 ) > 0 ? ( .@amount * .@ratio / 1000 ) : rand( 0,.@amount2 ) ); if ( .@r ) { setd ".@i_"+ .@itemid, getd( ".@i_"+ .@itemid ) + .@r; getitem .@itemid, .@r, .@aid[.@i]; } } } } .@size = getd( ".size_variable_"+ .@mob_id ); if ( .@size ) {// give variable reward if ( .@aid[.@i] != .@self_aid ) attachrid .@aid[.@i]; for ( .@j = 0; .@j < .@size; .@j += 2 ) { .@var$ = getd( ".variable_"+ .@mob_id +"$["+ .@j +"]" ); .@amount = getd( ".amount_variable_"+ .@mob_id +"["+ .@j +"]" ); if ( getd( ".@v_"+ .@var$ ) < .@amount ) { .@amount2 = .@amount - getd( ".@v_"+ .@var$ ); .@r = ( .@i == .@count -1 ) ? .@amount2 : ( ( .@amount* .@ratio / 1000 ) > 0 ? ( .@amount * .@ratio / 1000 ) : rand( 0,.@amount2 ) ); if ( .@r ) { setd ".@v_"+ .@var$, getd( ".@v_"+ .@var$ ) + .@r; setd .@var$, getd( .@var$ ) + .@r; dispbottom "You got "+ .@r +" "+ .@var$ +". Total: "+ getd( .@var$ ) +" "+ .@var$; } } } } } end; function MobReward {// split item/variable rewards to avoid attachrid if none variable reward .@argcount = getargcount(); .@mob_id = getarg(0); if ( .@argcount < 3 || (.@argcount+1)%2 ) debugmes strnpcinfo(3) +": not enough argument for monster "+ .@mob_id +".. skipping"; else if ( compare( .concat_mobid$, .@mob_id +"" ) ) debugmes strnpcinfo(3) +": mob id "+ .@mob_id +" give already a reward.. skipping"; else { .concat_mobid$ = .concat_mobid$ +"|"+ .@mob_id; for ( .@i = 1; .@i < .@argcount; .@i += 2 ) { if ( atoi( getarg(.@i) +"" ) ) {// is item setd ".item_id_"+ .@mob_id +"["+ .@size_item +"]", getarg(.@i); setd ".amount_item_id_"+ .@mob_id +"["+ .@size_item +"]", getarg(.@i+1); .@size_item++; } else {// is var setd ".variable_"+ .@mob_id +"$["+ .@size_var +"]", getarg(.@i); setd ".amount_variable_"+ .@mob_id +"["+ .@size_var +"]", getarg(.@i+1); .@size_var++; } } setd ".size_item_id_"+ .@mob_id, .@size_item;// size item for this monster setd ".size_variable_"+ .@mob_id, .@size_var; } } }
-
activate pvp when X players are in a map.
Capuche replied to HristDead's question in Scripting Support
comment dispbottom ""+getcharid(1); it may be a debug -
Custom_Pets Your problem may be related to that. I suggest to make a menu to give yours pets with a npc using makepet
-
-
prontera,150,180,5 script your newbienpc 56,{ if(!#oldplayer) { mes "wanna do the newbie quest?"; next; if ( select( "yes", "no" ) -1 ) end; // your newbie quest set #oldplayer,1; } } - script dummy -,{ OnPCLoginEvent: if(!#oldplayer) { mes "wanna do the newbie quest?"; next; if ( select( "yes", "no" ) -1 ) end; // your newbie quest set #oldplayer,1; } } split the npc
-
Disable the sound in the script
-
// Capuche cleaning Base on the poring race by Zell_ff8, xianz, Neko prontera,139,184,5 script Poring Race 882,{ if( .access_Prace == 0 ) { mes "[Poring Race Staff]"; mes "Poring Race has ended."; close; } mes "[Poring Race Staff]"; mes "Do you want to participate on Poring Race?"; if( select( "Yes","No" ) -1 ) { next; mes "[Poring Race Staff]"; mes "See you again next time!"; close; } if( .access_Prace == 0 ) { next; mes "[Poring Race Staff]"; mes "..."; mes "..."; mes "Cheater!!~~"; close; } close2; @prace_winner$ = ""; warp "p_track01",52,41; end; // OnInit: OnMinute20: if( gettime(3)%2 ) end; set .access_Prace, 1; announce "Poring Race is now open!",0,0xFFAB54; setnpctimer 100000,"Bidder#prace0"; startnpctimer "Bidder#prace0"; end; OnPraceEnd: set .access_Prace, 0; announce "Poring Race is over!",0,0xFFAB54; end; } p_track01,58,41,3 script Bidder#prace0 877,{ function checkevent; mes "[Bidder]"; if( getstrlen( @prace_winner$ ) ) { mes "You have choose ^00bb00"+ @prace_winner$ +"^000000"; close; } else if ( checkevent() || .start ) { mes "There is a race in progress..."; close; } else if( !getvariableofnpc( .access_Prace,"Poring Race" ) ) { mes "There is no race."; close; } mes "Choose the poring you want to bet:"; mes "It will cost "+ .zeny_req +" Zeny."; .@s = select( .menu_$ ); if( .@s == 7 ) { next; mes "[Bidder]"; mes "Goodbye."; close; } .@c$ = .monst_$[ .@s -1 ]; if ( checkevent() ) { next; mes "[Bidder]"; mes "..."; mes "..."; mes "Cheater!!~~"; close; } else if( Zeny < .zeny_req ) { next; mes "[Bidder]"; mes "You don't have enough Zeny."; close; } Zeny -= .zeny_req; @prace_winner$ = .@c$; .prace_bidders[ .prace_bets ] = getcharid(3); .prace_bets++; next; mes "[Bidder]"; mes "I have "+ .prace_bets +" bets."; initnpctimer; npctalk "I got "+ strcharinfo(0) +" bet!"; close; OnTimer60000: npctalk "I got "+ .prace_bets +" bets. Anyone else?"; end; OnTimer80000: npctalk "The race will start soon. Last chance."; end; OnTimer90000: stopnpctimer; .start = 1; mapannounce "p_track01","Porings, on your marks...",1,0xFFAB54; sleep 2500; for( .@i = 3; .@i > 0; .@i-- ) { mapannounce "p_track01","..."+ .@i +"...",1,0xFFAB54; sleep 1000; } donpcevent strnpcinfo(0) +"::OnStartRace"; sleep 1000; mapannounce "p_track01","Gooo!!!",1,0xFFAB54; end; OnTimer320000: mapwarp "p_track01","prontera",142,170; donpcevent "Poring Race::OnPraceEnd"; .prace_winner$ = ""; .start = .prace_bets = 0; donpcevent strnpcinfo(0) +"::OnReturnRace"; end; OnStartRace: callsub L_label, "OnRace"; OnStopRace: callsub L_label, "OnStop"; OnReturnRace: callsub L_label, "OnReturn"; L_label: donpcevent "Metaling#prace3::"+ getarg(0); donpcevent "Poring#prace1::"+ getarg(0); donpcevent "Poporing#prace6::"+ getarg(0); donpcevent "Angeling#prace2::"+ getarg(0); donpcevent "Santa Poring#prace5::"+ getarg(0); donpcevent "Deviling#prace4::"+ getarg(0); if( getarg(0) == "OnStop" && .prace_winner$ != "" ) callsub L_WinRace; end; L_WinRace: mapannounce "p_track01", "The winner is "+ .prace_winner$,1,0xFFAB54; donpcevent strnpcinfo(0) +"::OnChequeo"; sleep 3000; donpcevent strnpcinfo(0) +"::OnReturnRace"; sleep 10000; mapwarp "p_track01","prontera",142,170; donpcevent "Poring Race::OnPraceEnd"; .prace_winner$ = ""; .start = .prace_bets = 0; end; OnChequeo: for( .@i = 0 ; .@i < getarraysize( .prace_bidders ); .@i++ ) { if( attachrid( .prace_bidders[.@i] ) && getstrlen( @prace_winner$ ) ) { dispbottom "The winner is "+ .prace_winner$ +" and you have bet for "+ @prace_winner$ +"."; if( @prace_winner$ == .prace_winner$ ) { dispbottom "You have won!"; mapannounce "p_track01"," Congratulations! "+ strcharinfo(0) +" has won!",1,0xFFAB54; getitem .item_gained, .item_num_gain; emotion 21,1; } else { dispbottom "You have lost."; emotion 28,1; } @prace_winner$ = ""; } } deletearray .prace_bidders; end; OnInit: .zeny_req = 3500; .item_gained = 7199; .item_num_gain = 2; setarray .monst_$,"Poring","Angeling","Metaling","Deviling","Santa Poring","Poporing","None"; .menu_$ = implode( .monst_$, ":" ); end; function checkevent { getmapxy .@mapname$, .@x1, .@y, 1, "Poring#prace1"; getmapxy .@mapname$, .@x2, .@y, 1, "Angeling#prace2"; getmapxy .@mapname$, .@x3, .@y, 1, "Metaling#prace3"; getmapxy .@mapname$, .@x4, .@y, 1, "Deviling#prace4"; getmapxy .@mapname$, .@x5, .@y, 1, "Santa Poring#prace5"; getmapxy .@mapname$, .@x6, .@y, 1, "Poporing#prace6"; .@t = ( .@x1 + .@x2 + .@x3 + .@x4 + .@x5 + .@x6 ) != 58 * 6; return .@t; } } //----------------------------------- // Racer NPC's //----------------------------------- - script pori_race -1,{ OnRace: initnpctimer; end; OnStop: stopnpctimer; end; OnReturn: sleep 1000; while( strnpcinfo(1) != .monst$[ .@i ] ) .@i++; movenpc strnpcinfo(3), 58, .walk_t[.@i]; end; OnTimer1100: getmapxy .@mapname$,.@x,.@y,1, strnpcinfo(3); if( rand(100) < .prace_random ) npcwalkto .@x-1, .@y; .@r = rand( .prace_random2 ); if ( .@x -1 == 29 ) { while( strnpcinfo(1) != .monst$[ .@i ] ) .@i++; set getvariableofnpc( .prace_winner$, "Bidder#prace0" ), .monst$[ .@i ]; emotion 29; donpcevent "Bidder#prace0::OnStopRace"; end; } stopnpctimer; setnpctimer .@r; startnpctimer; end; OnInit: deletearray .walk_t; deletearray .monst$; setarray .walk_t, 38, 36, 34, 32, 30, 28; setarray .monst$, "Poring", "Angeling", "Metaling", "Deviling", "Santa Poring", "Poporing"; .prace_random = 70; .prace_random2 = 600; end; } p_track01,58,38,2 duplicate(pori_race) Poring#prace1 1002 p_track01,58,36,2 duplicate(pori_race) Angeling#prace2 1096 p_track01,58,34,2 duplicate(pori_race) Metaling#prace3 1613 p_track01,58,32,2 duplicate(pori_race) Deviling#prace4 1582 p_track01,58,30,2 duplicate(pori_race) Santa Poring#prace5 1062 p_track01,58,28,2 duplicate(pori_race) Poporing#prace6 1031 p_track01,78,42,0 warp p_track002 1,3,prontera,142,170 p_track01 mapflag nobranch p_track01 mapflag noicewall p_track01 mapflag nomemo p_track01 mapflag noreturn p_track01 mapflag noteleport p_track01 mapflag nowarpto p_track01 mapflag nowarp p_track01 mapflag pvp off p_track01 mapflag nosave
-
- script jkolojiopp -,{ OnNPCKillEvent: if ( killedrid > 2351 && killedrid < 2413 ) getitem 20007, 1; } Custom_Pets
-
- .@nb = query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points ); - for ( .@i = 0; .@i < .@nb; .@i++ ) { + set .@nb, query_sql( "select name, woe_points from guild order by woe_points desc limit 3", .@guild_name$, .@points ); + for ( set .@i, 0; .@i < .@nb; set .@i, .@i +1 ) { these emu don't support direct variable assignment like in C
-
MVP Cash Points not working on summoned mvps
Capuche replied to Zaon's question in Scripting Support
it's the good one OnThanaDead: donpcevent "#thanatimer::OnActive"; doevent "MVPReward#1708::OnNPCKillEvent"; set $@thana_summon,6; end; -
MVP Cash Points not working on summoned mvps
Capuche replied to Zaon's question in Scripting Support
OnMyMobDead: if (mobcount("thana_boss","#sommon_thanatos::OnMyMobDead") < 1) { mapannounce "thana_boss","RAWWWWWWWWWWR........ This can't be.........................",bc_map,"0xff0000"; //FW_NORMAL 12 0 0 donpcevent "#cooltime_thana::OnEnable"; set $@thana_summon, 6; doevent "MVPReward#1708::OnNPCKillEvent";// <- this } end; -
MVP Cash Points not working on summoned mvps
Capuche replied to Zaon's question in Scripting Support
doevent not donpcevent -
MVP Cash Points not working on summoned mvps
Capuche replied to Zaon's question in Scripting Support
find the label triggered when the mvp from quest is killed and add doevent "<your npc name where onnpckillevent>"+ "::OnNPCKillEvent"; -
function script ShoesCheck { setarray .@card_list,4009,4038,4050,4070,4097,4100,4107,4123,4131,4151,4160,4164,4168,4186,4199,4200,4204,4208,4221,4235,4236,4239,4244,4245,4249,4257,4267,4275,4290,4319,4352,4376,4378,4381,4396,4417,4435,4441,4467,4478,4482,4488,4490,4495,4498,4504,4532,4539; set .@size,getarraysize( .@card_list ); while( .@i < .@size ){ if( getequipcardid (EQI_SHOES,0) == .@card_list[.@i] || getequipcardid (EQI_SHOES,1) == .@card_list[.@i] || getequipcardid (EQI_SHOES,2) == .@card_list[.@i] || getequipcardid (EQI_SHOES,3) == .@card_list[.@i] ) { callfunc "ShoesErrorMsg"; } set .@i,.@i + 1; } return; } about this script you could use function script ShoesCheck { if ( isequippedcnt( 4009,4038,4050,4070,4097,4100,4107,4123,4131,4151,4160,4164,4168,4186,4199,4200,4204,4208,4221,4235,4236,4239,4244,4245,4249,4257,4267,4275,4290,4319,4352,4376,4378,4381,4396,4417,4435,4441,4467,4478,4482,4488,4490,4495,4498,4504,4532,4539 ) > 1 ) callfunc "ShoesErrorMsg"; } whatever since you changed your mind for ( .@i = 0; .@i < 4; .@i++ ) if ( getiteminfo( getequipcardid( EQI_SHOES,.@i ),5 ) == 2 ) {// card 'equip' weapon callfunc "ShoesErrorMsg"; break; }
-
how to make monster wiki automated every 1hour
Capuche replied to Famous's question in Script Requests
OnMinute00: for( set .@i,3; .@i > 0 ; set .@i,.@i - 1 ){ announce "Monster Wiki Event will take place in Prontera within "+.@i+" Minutes",bc_blue; sleep 60000; this event is already auto every hour