-
Posts
2407 -
Joined
-
Last visited
-
Days Won
51
Community Answers
-
Capuche's post in i got error in putty was marked as the answer
compare(getarg(.e+1),"SZeny")
compare command compare 2 strings and in your case getarg(.e+1) is a number
Put +"" after getarg(.e+1) in all compare command to avoid this warning
Example
compare(getarg(.e+1) +"","SZeny")
-
Capuche's post in All Party Members Received Items was marked as the answer
Okay
- script hjkl -1,{ OnMobDead: if( getcharid(1) ) { getpartymember( getcharid(1),2 ); getpartymember( getcharid(1),1 ); .@map_killer$ = strcharinfo(3); .@chance = rand(10); for( .@i = 0; .@i < $@partymembercount; .@i++ ) if( isloggedin( $@partymemberaid[ .@i ],$@partymembercid[ .@i ] ) ) if( !getmapxy( .@map$, .@x, .@y, 0, rid2name( $@partymemberaid[ .@i ] ) ) && .@map$ == .@map_killer$ ) { getitem 501, 1, $@partymemberaid[ .@i ];// put ID bronze coin instead of 501 if( !.@chance ) getitem 502, 1, $@partymemberaid[ .@i ];// put ID gold coin } } end; } This way the poring must be summon with an NPC
*monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>,"hjkl::OnMobDead";
EDIT: it should work with source modifications, sure
-
Capuche's post in check character if he has the item was marked as the answer
prontera,159,180,5 script hjkl 456,{ mes "Enter a name."; input .@n$; if ( query_sql("SELECT `account_id` FROM `char` WHERE `name` = '"+ escape_sql( .@n$ ) +"'", .@a_id ) ) { query_sql("SELECT `char_id`, `guild_id` FROM `char` WHERE `account_id` = '"+ .@a_id +"'", .@c_id, .@g_id ); mes "Input an item ID."; input .@item; if( getitemname( .@item ) == "" ) { mes "wrong item ID"; close; } for( .@i = 0; .@i < getarraysize( .@c_id ); .@i++ ) { query_sql( "SELECT SUM(`amount`) FROM `inventory` WHERE `char_id` = "+ .@c_id[.@i] +" AND `nameid` = "+ .@item, .@count_inv ); query_sql( "SELECT SUM(`amount`) FROM `cart_inventory` WHERE `char_id` = "+ .@c_id[.@i] +" AND `nameid` = "+ .@item, .@count_cart ); query_sql( "SELECT SUM(`amount`) FROM `guild_storage` WHERE `guild_id` = "+ .@g_id[.@i] +" AND `nameid` = "+ .@item, .@count_gsto ); .@inv = .@inv + .@count_inv + .@count_cart; .@gsto = .@gsto + .@count_gsto; } query_sql( "SELECT SUM(`amount`) FROM `storage` WHERE `account_id` = "+ .@a_id +" AND `nameid` = "+ .@item, .@count_sto ); .@inv = .@inv + .@count_sto; } else { mes "Character '"+.@n$+"' does not exist."; close; } mes "Character '"+.@n$+"' has ^0055FF"+ .@inv +"^000000 "+ getitemname( .@item ) +" ("+ .@item +") in his account (storage, inventory, cart inventory).", ( !.@gsto ? "" : ( "And ^0055FF"+ .@gsto +"^000000 "+ getitemname( .@item ) +" in guild storage on all his character." ) ); close; } Check item ID in inventory, cart inventory, storage and gstorage of all player in the account of the player's name you write
Can be improve ( my skills in SQL are 'NULL' lol)
-
Capuche's post in Guild Skill Approval was marked as the answer
hmmm just this ?
prontera,159,180,5 script hjkl 456,{ if ( !getskilllv(10000) ) { mes "your guild doesn't have lvl 1 approval"; close; } warp "prontera",0,0;// warp in your guild house ? end; }
getskilllv(10000) check if the player have approval ( Skill ID 10000 ) and return the level of the skill if so
-
Capuche's post in Warp with Messages was marked as the answer
Use triggers (no need OnTouch for NPC ID 45 with triggers)
prontera,160,180,0 script lun002 45,2,2,{ if (BaseLevel < 100) mes "I need to be level 100 and above"; else warp "prontera",21,12; close; } -
Capuche's post in Customized Poring Race was marked as the answer
http://pastebin.com/raw.php?i=EWcS12eL
I just change
// set Zeny, Zeny + @prace_zeny*6; set #PoringRacePoints, #PoringRacePoints + @prace_zeny*6;//Poring Race Points and
p1: set #PoringRacePoints, #PoringRacePoints -@prace_zeny; set @prace_winner$,"Poring"; goto Ready; p2: set #PoringRacePoints, #PoringRacePoints -@prace_zeny; set @prace_winner$,"Angeling"; goto Ready; p3: set #PoringRacePoints, #PoringRacePoints -@prace_zeny; set @prace_winner$,"Metaling"; goto Ready; p4: set #PoringRacePoints, #PoringRacePoints -@prace_zeny; set @prace_winner$,"Deviling"; goto Ready; p5: set #PoringRacePoints, #PoringRacePoints -@prace_zeny; set @prace_winner$,"Santa Poring"; goto Ready; p6: set #PoringRacePoints, #PoringRacePoints -@prace_zeny; set @prace_winner$,"Poporing"; goto Ready; and remove the cheat (lol)
With this, players can bet Poring Race Points and gain news points
-
Capuche's post in Matk Formula was marked as the answer
status.c
#ifndef RENEWAL static inline unsigned short status_base_matk_min(const struct status_data* status){ return status->int_+(status->int_/7)*(status->int_/7); } static inline unsigned short status_base_matk_max(const struct status_data* status){ return status->int_+(status->int_/5)*(status->int_/5); } #else unsigned short status_base_matk(const struct status_data* status, int level){ return status->int_+(status->int_/2)+(status->dex/5)+(status->luk/3)+(level/4); }// renewal formula #endif -
Capuche's post in woe warp with map flag was marked as the answer
It's just a matter of lowercase/uppercase for some NPC name ( castle 4 and 5 for yuno and rachel )
yuno,109,167,5 script Himinn 722,{ if( select( "^777777~ Warp to "+ strnpcinfo(1) +" ?:~ Cancel^000000" ) -1 ) close; getmapxy( .@map$, .@x, .@y, 1, "Sc01_Flag" ); warp .@map$, .@x, .@y; end; OnAgitInit2: OnRecvCastlesc01: FlagEmblem GetCastleData("schg_cas01",1); end; } yuno,110,171,5 script Andlangr 722,{ if( select( "^777777~ Warp to "+ strnpcinfo(1) +" ?:~ Cancel^000000" ) -1 ) close; getmapxy( .@map$, .@x, .@y, 1, "Sc02_Flag" ); warp .@map$, .@x, .@y; end; OnAgitInit2: OnRecvCastlesc02: FlagEmblem GetCastleData("schg_cas02",1); end; } yuno,111,175,5 script Viblainn 722,{ if( select( "^777777~ Warp to "+ strnpcinfo(1) +" ?:~ Cancel^000000" ) -1 ) close; getmapxy( .@map$, .@x, .@y, 1, "Sc03_Flag" ); warp .@map$, .@x, .@y; end; OnAgitInit2: OnRecvCastlesc03: FlagEmblem GetCastleData("schg_cas03",1); end; } yuno,112,179,5 script Hljod 722,{ if( select( "^777777~ Warp to "+ strnpcinfo(1) +" ?:~ Cancel^000000" ) -1 ) close; getmapxy( .@map$, .@x, .@y, 1, "sc04_Flag" ); warp .@map$, .@x, .@y; end; OnAgitInit2: OnRecvCastlesc04: FlagEmblem GetCastleData("schg_cas04",1); end; } yuno,114,183,5 script Skidbladnir 722,{ if( select( "^777777~ Warp to "+ strnpcinfo(1) +" ?:~ Cancel^000000" ) -1 ) close; getmapxy( .@map$, .@x, .@y, 1, "sc05_Flag" ); warp .@map$, .@x, .@y; end; OnAgitInit2: OnRecvCastlesc05: FlagEmblem GetCastleData("schg_cas05",1); end; } // Arunafeltz rachel,124,120,3 script Mardol 722,{ if( select( "^777777~ Warp to "+ strnpcinfo(1) +" ?:~ Cancel^000000" ) -1 ) close; getmapxy( .@map$, .@x, .@y, 1, "Ar01_Flag" ); warp .@map$, .@x, .@y; end; OnAgitInit2: OnRecvCastlear01: FlagEmblem GetCastleData("arug_cas01",1); end; } rachel,136,120,5 script Cyr 722,{ if( select( "^777777~ Warp to "+ strnpcinfo(1) +" ?:~ Cancel^000000" ) -1 ) close; getmapxy( .@map$, .@x, .@y, 1, "Ar02_Flag" ); warp .@map$, .@x, .@y; end; OnAgitInit2: OnRecvCastlear02: FlagEmblem GetCastleData("arug_cas02",1); end; } rachel,138,126,6 script Horn 722,{ if( select( "^777777~ Warp to "+ strnpcinfo(1) +" ?:~ Cancel^000000" ) -1 ) close; getmapxy( .@map$, .@x, .@y, 1, "Ar03_Flag" ); warp .@map$, .@x, .@y; end; OnAgitInit2: OnRecvCastlear03: FlagEmblem GetCastleData("arug_cas03",1); end; } rachel,135,131,7 script Gefn 722,{ if( select( "^777777~ Warp to "+ strnpcinfo(1) +" ?:~ Cancel^000000" ) -1 ) close; getmapxy( .@map$, .@x, .@y, 1, "ar04_Flag" ); warp .@map$, .@x, .@y; end; OnAgitInit2: OnRecvCastlear04: FlagEmblem GetCastleData("arug_cas04",1); end; } rachel,124,130,1 script Banadis 722,{ if( select( "^777777~ Warp to "+ strnpcinfo(1) +" ?:~ Cancel^000000" ) -1 ) close; getmapxy( .@map$, .@x, .@y, 1, "ar05_Flag" ); warp .@map$, .@x, .@y; end; OnAgitInit2: OnRecvCastlear05: FlagEmblem GetCastleData("arug_cas05",1); end; } -
Capuche's post in countitem in mes was marked as the answer
if ( countitem(501) < 5 && countitem(502) < 5 ) { mes "I still require "+ ( 20-countitem(512) ) +" more apples!"; close; } The brackets !
-
Capuche's post in Party members can hit each other on PVP was marked as the answer
Mapflags are the cause
Mapflag#pvp_noguild
Mapflag#pvp_noparty
Search and change yours in conf/mapflag/ folder
-
Capuche's post in Variable problem with my 2 scripts was marked as the answer
If you want to add more than the poring event you're right, like an all-in-one event manager
But you must to delete the array on the 1st NPC, I suggest donpcevent and getvariableofnpc
prontera,146,76,5 script Event Warper 909,{ set .@name$,"[Warper]"; if( select( "Enter", "Cancel " ) -1 ) { mes .@name$; mes "See ya"; close; } else if( .accessFTP == 0 ) { set .@Hour, gettime(3); set .@Minute, gettime(2); set .@FTPTime, gettime(3) + 4; if( gettime(3)%4 == 1 ) set .@FTPTime, .@FTPTime-1; if(gettime(3)%4 == 2) set .@FTPTime, .@FTPTime-2; if(gettime(3)%4 == 3) set .@FTPTime, .@FTPTime-3; mes .@name$; mes "Find the Poring is closed right now.."; mes "The next Event starts on "+ .@FTPTime +"."; mes "And right now it is "+ .@Hour +":"+ .@Minute +"."; close; } else if( .register_num >= 128 ) { // room FULL mes .@name$; mes "I'm sorry but this Event is FULL."; mes "Maximum users to enter is 128 players."; close; } for( set .@i, 0; .@i < .register_num; set .@i, .@i + 1 ) { if( .register_aid[.@i] == getcharid(3) ) { mes .@name$; mes "You got warped once! Try again next time!"; close; } } warp "pvp_y_1-5",0,0; set @FTPChance, 0; set .register_aid[ .register_num ], getcharid(3); set .register_num, .register_num + 1; end; OnReset: deletearray .register_aid; set .register_num, 0; end; } - script FTPoring -1,{ OnClock0000: OnClock0400: OnClock0800: OnClock1200: OnClock1653: OnClock2000: announce "Find the Poring is now started!",0; killmonsterall "pvp_y_1-5"; monster "pvp_y_1-5",0,0,"Drops",1113,1000,"FTPoring::OnMobDeath"; monster "pvp_y_1-5",0,0,"Marin",1242,1000,"FTPoring::OnMobDeath"; monster "pvp_y_1-5",0,0,"Santa Poring",1062,1000,"FTPoring::OnMobDeath"; monster "pvp_y_1-5",0,0,"Metaling",1613,1000,"FTPoring::OnMobDeath"; monster "pvp_y_1-5",0,0,"Stapo",1784,1000,"FTPoring::OnMobDeath"; monster "pvp_y_1-5",0,0,"Poring",1002,1,"FTPoring::OnWinMobDeath"; mapwarp "pvp_y_1-5","prontera",156,98; set getvariableofnpc( .accessFTP, "Event Warper" ),1; donpcevent "Event Warper::OnReset"; end; OnMobDeath: set @FTPChance,@FTPChance+1; if(@FTPChance>=3){ warp "prontera",156,98; dispbottom "You've run out of chances!"; end; } dispbottom "Wrong Monster! You have "+(3-@FTPChance)+" chance's left"; end; OnWinMobDeath: mapannounce "pvp_y_1-5","["+strcharinfo(0)+"] has found the poring! The Event is over!",0; GetItem( 20002, 3 ); mapwarp "pvp_y_1-5","prontera",156,98; killmonsterall "pvp_y_1-5"; set @FTPChance,0; set getvariableofnpc( .accessFTP, "Event Warper" ), 0; donpcevent "Event Warper::OnReset"; end; }
set getvariableofnpc( .accessFTP, "Event Warper" ), 0; will put variable .accessFTP in the "Event Warper" to 0
-
Capuche's post in how to set mapflag? was marked as the answer
You can also use @mapflag command
desactivate nowarpto on map (reloadscript desactivate to)
@mapflag nowarpto 0
activate nowarpto
@mapflag nowarpto 1
-
Capuche's post in How to script unlimited box? was marked as the answer
A rental item which give unlimit box ? I hope you will understand my example :
prontera,155,168,5 script yuio 456,{ rentitem 13531, 86400 * 30; // 30 days end; }
A NPC give a rental item.
// ID,AegisName,Name,Type,Buy,Sell,Weight,ATK,DEF,Range,Slots,Job,Upper,Gender,Loc,wLV,eLV,Refineable,View,{ Script },{ OnEquip_Script },{ OnUnequip_Script } 13531,Light_Red_Pot_Box,Light Red Potion Box,11,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 603,1; },{},{}
An item (not consumed - type 11) give unlimit item.
-
Capuche's post in Guild Master Changer was marked as the answer
Works for me. Maybe tab error ?
Basic_Scripting#NPC
-
Capuche's post in why this script not working? was marked as the answer
Try openstorage; instead of atcommand "@storage";
-
Capuche's post in Disable Kagerou Oboro classes in this script ? was marked as the answer
Replace
switch(select(.@menu$)) { case 1: function Job_Menu; function A_An; if (Class > 4049) { message strcharinfo(0),"No more jobs are available."; close; }
to
switch(select(.@menu$)) { case 1: function Job_Menu; function A_An; if (Class > 4049 || Class == 25) { message strcharinfo(0),"No more jobs are available."; close; }
-
Capuche's post in check party if all the member and leader has the TCG? was marked as the answer
Editing
prontera,150,160,5 script ghjkl 456,{ .@itemid = 7227; .@amount = 10; .@event_map$ = "prontera"; .@aid = getcharid(3); if( !getcharid(1) ) { mes "You are not in a party."; close; } getpartymember getcharid(1),0; getpartymember getcharid(1),1; getpartymember getcharid(1),2; while( .@i < $@partymembercount ){ if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid( $@partymemberaid[ .@i ] ); if( countitem( .@itemid ) < .@amount ){ attachrid( .@aid ); mes "Your member "+$@partymembername$[.@i]+" haven't "+.@amount+" "+getitemname( .@itemid )+"."; close; } .@log_in[ getarraysize( .@log_in ) ] = $@partymemberaid[ .@i ]; } .@i++; } for( .@i = 0; .@i < getarraysize( .@log_in ); .@i++ ) delitem .@itemid, .@amount, .@log_in[ .@i ]; attachrid( .@aid ); dispbottom "All got items."; warpparty .@event_map$, 150,150, getcharid(1); close; }
-
Capuche's post in Party Recall was marked as the answer
Sorry I misread your post
12212,Giant_Fly_Wing,Giant Fly Wing,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_CashPartyCall"; },{},{}
is like a fly wing but warp all member in party and you ask a script that do something like partyrecall...
Here for you
function script F_PartyReCall { if(getpartyleader(getcharid(1),2) == getcharid(0)) { set .@leader, getcharid(3); getmapxy .@mapl$, .@xl, .@yl, 0; getpartymember getcharid(1),2; set .@partymembercount, $@partymembercount; copyarray .@partymemberaid[0], $@partymemberaid[0], .@partymembercount; for(set .@i, 0; .@i < .@partymembercount; set .@i, .@i + 1) { if(attachrid(.@partymemberaid[.@i])) { if(HP > 0 && getcharid(3) != .@leader) { warp .@mapl$, .@xl, .@yl; } } } } return; }
-
Capuche's post in Test, And tell me the error(s). was marked as the answer
R_yes1.2
Wrong. Don't ever use . in label name.
if(countitem(7864)2)goto L_broke;
Learn to read the error shown on your map_server console, it's very easy /$
-
Capuche's post in +10 refiner was marked as the answer
100% sure... +10... need 1 TCG Card per refine... players can choose equipment.
prt_in,57,55,5 script lkjhgf 63,{ //- setarray .@safe[0], 10, 10, 10, 10, 10, 10; setarray .@TicketID, 7227; //- mes "[blacksmith]"; mes "I'm the Blacksmith."; mes "I can refine all kinds of weapons, armor and equipment, so let me"; mes "know what you want me to refine."; next; setarray .@position$[1], "^0000ffHead^000000","^0000ffBody^000000","^FF0000Left hand^000000","^FF0000Right hand^000000","^0000ffRobe^000000","^0000ffShoes^000000","Accessory 1","Accessory 2","^0000ffHead 2^000000","^0000ffHead 3^000000"; for( set .@i, 1; .@i <= getarraysize(.@position$); set .@i, .@i+1 ) { if( getequipisequiped(.@i) ) set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; set .@menu$, .@menu$+ ":"; } set .@part, select( .@menu$ ); if( !getequipisequiped(.@part) ) { mes "[blacksmith]"; mes "You're not wearing"; mes "anything there that"; mes "I can refine."; emotion 6; close; } //Check if the item is refinable... if( !getequipisenableref(.@part) ) { mes "[blacksmith]"; mes "I don't think I can"; mes "refine this item at all..."; close; } //Check if the item is identified... (Don't know why this is in here... but kept it anyway) if( !getequipisidentify(.@part) ) { mes "[blacksmith]"; mes "You can't refine this"; mes "if you haven't appraised"; mes "it first. Make sure your"; mes "stuff is identified before"; mes "I can refine it."; close; } //Check to see if the items is already +10 if( getequiprefinerycnt(.@part) >= 10 ) { mes "[blacksmith]"; mes "I can't refine this"; mes "any more. This is as"; mes "refined as it gets!"; close; } set .@refineitemid, getequipid(.@part); // save id of the item set .@wp, getequipweaponlv(.@part); if( ( .@mRn = select( "+10, please.", "I've changed my mind..." )-1 ) > 0 ) { next; mes "[blacksmith]"; mes "You said so... So be it."; close; } .@rcnt = .@safe[.@wp] - getequiprefinerycnt(.@part); set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count mes "[blacksmith]"; mes "To refine this I need"; mes "^FF0000"+.@rcnt+" "+getitemname( .@TicketID )+"^000000"; mes "Do you really wish to continue?"; next; if( select( "Yes:No" ) == 2 ) { mes "[blacksmith]"; mes "Yeah..."; mes "There's no need to"; mes "rush. Take your time."; close; } if( countitem(.@TicketID) < .@rcnt ) { mes "[blacksmith]"; mes "You don't seem to have"; mes "enough ^000000"+getitemname( .@TicketID )+"^000000..."; mes "Go get some more. I'll be"; mes "here all day if you need me."; close; } if(getequipisequiped(.@part) == 0) { // hacker has removed the item (not changed, why?) mes "[blacksmith]"; mes "Look here... you don't have any Items on..."; close; } if(getequiprefinerycnt(.@part) != .@refinerycnt || getequipid(.@part) != .@refineitemid) { // hacker has changed the item mes "[blacksmith]"; emotion e_an; mes "Wait a second..."; mes "Do you think I'm stupid?!"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } mes "[blacksmith]"; delitem .@TicketID, .@rcnt; for( .@i = 0; .@i < .@rcnt; .@i++ ) successrefitem .@part; emotion e_heh; if( !(.@win = rand(2)) ) { mes "[blacksmith]"; mes "Perfect!"; mes "Heh heh!"; mes "Once again,"; mes "flawless work"; mes "from the master~"; } else if( .@win == 1 ) { mes "[blacksmith]"; mes "Success...!"; mes "Yet again, my amazing"; mes "talent truly dazzles"; mes "and shines today."; } else { mes "[blacksmith]"; mes "Heh heh!"; mes "I'm all done."; mes "No doubt, my work is"; mes "to your satisfaction."; mes "Sheer, utter perfection~"; } close; }
-
Capuche's post in Mini and MVP Boss CashPoint was marked as the answer
- script gvubhnji -1,{ OnNPCKillEvent: if( killedrid && ( getmonsterinfo(killedrid, 21) & 0x0020 ) && ( killedrid <= 3000 ) ) { if( getmonsterinfo(killedrid, 22) ) .@R = rand( 100, 500 );//-- MVP else .@R = rand( 50, 150 );//-- MINIBOSS #CASHPOINTS = #CASHPOINTS + .@R; dispbottom "Gained : "+ .@R +" points. Total : "+ #CASHPOINTS +" points."; } end; }