-
Content Count
366 -
Joined
-
Last visited
-
Days Won
8
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Patskie
-
Can be, can be, master @AnnieRuru
-
prontera,150,150,0 script Sample 100,{ if ( getcharid( 1 ) ) { getpartymember getcharid( 1 ), 1; getpartymember getcharid( 1 ), 2; do { .index = rand( $@partymembercount ); .random_member$ = rid2name( $@partymemberaid[ .index ] ); } while ( !isloggedin( $@partymemberaid[ .index ], $@partymembercid[ .index ] ) ); mes "Random member : " +.random_member$; } close;} A template
-
Need this script applied to the party, not only the killer in the party
Patskie replied to Adam's question in Script Support
First one. Did i seriously misread the word anyone to everyone? T_T -
Need this script applied to the party, not only the killer in the party
Patskie replied to Adam's question in Script Support
Edited my previous post -
Need this script applied to the party, not only the killer in the party
Patskie replied to Adam's question in Script Support
- script custom_drop -1,{ OnNPCKillEvent: // Global Monster Kill Rewards set .@rand_gc_drop, rand(1,4000); if (.@rand_gc_drop <= 25) { if ( !getcharid( 1 ) ) getitem 512, 1; else { getpartymember getcharid( 1 ), 1; getpartymember getcharid( 1 ), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[ .@i ], $@partymembercid[ .@i ] ) ) { if ( attachrid( $@partymemberaid[ .@i ] ) ) getitem 512, 1; } } } } set .@rand_sc_drop, rand(1,2000); if (.@rand_sc_drop <= 5) { if ( !getcharid( 1 ) ) getitem 513, 1; else { getpartymember getcharid( 1 ), 1; getpartymember getcharid( 1 ), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[ .@i ], $@partymembercid[ .@i ] ) ) { if ( attachrid( $@partymemberaid[ .@i ] ) ) getitem 513, 1; } } } } set .@rand_bc_drop, rand(1,1000); if (.@rand_bc_drop <= 1) { if ( !getcharid( 1 ) ) getitem 511, 1; else { getpartymember getcharid( 1 ), 1; getpartymember getcharid( 1 ), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[ .@i ], $@partymembercid[ .@i ] ) ) { if ( attachrid( $@partymemberaid[ .@i ] ) ) getitem 511, 1; } } } } end;} -
Let me try : - script Sample -1,{ OnAgitEnd: query_sql "SELECT `account_id`, `char_id` FROM `guild_member` WHERE `guild_id` = '" + getcastledata( "prtg_cas01", 1 ) + "'",.@aid,.@cid; for ( .@i = 0; .@i < getarraysize( .@aid ); .@i++ ) { if ( isloggedin( .@aid[ .@i ], .@cid[ .@i ] ) ) { if ( attachrid( .@aid[ .@i ] ) ) { if ( !checkvending() ) { for ( .@x = 0; .@x < getarraysize( .Items ); .@x+=2 ) getitem .Items[ .@x ], .Items[ .@x + 1 ]; } } } if ( .include_offline ) { for ( .@x = 0; .@x < getarraysize( .Items ); .@x+=2 ) { if ( query_sql( "SELECT `nameid` FROM `inventory` WHERE `char_id` = '" + .@cid[ .@i ] + "' AND `nameid` = '" +.Items[ .@x ]+ "'" ) ) query_sql "UPDATE `inventory` SET `amount` = `amount` + " + .Items[ .@x + 1 ] + " WHERE `char_id` = '" + .@cid[ .@i ] + "' AND `nameid` = '" +.Items[ .@x ]+ "'"; else query_sql "INSERT INTO `inventory` ( `char_id`, `nameid`, `amount`, `identify` ) VALUES ( '" +.@cid[ .@i ]+ "' , '" +.Items[ .@x ]+ "', '" +.Items[ .@x + 1 ]+ "', '1')"; } } } end; OnInit: .include_offline = 0; // Include offline guild members? ( 1 = Enabled | 0 = Disabled ) setarray .Items[0],501,5,7227,5; // Item Id, Item Amount end;}
-
Redeemer NPC / Coupon NPC / Promotional NPC
Patskie replied to ThyroDree's question in Script Requests
/*DROP TABLE IF EXISTS `reward_codes`;CREATE TABLE IF NOT EXISTS `reward_codes` ( `code` VARCHAR(10) NOT NULL DEFAULT '', `nameid` INT(11) UNSIGNED NOT NULL DEFAULT '0', `item_name` VARCHAR(45) NOT NULL DEFAULT '', `amount` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', `time_created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' PRIMARY KEY (`code`)) ENGINE = MYISAM;DROP TABLE IF EXISTS `rewardlogs`;CREATE TABLE `rewardlogs` ( `account_id` INT( 10 ) NOT NULL, `code` VARCHAR( 10 ) NOT NULL, `redeem_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00') ENGINE = MyISAM;*/- script promoclaim -1,{OnInit: bindatcmd "claim",strnpcinfo(3)+"::OnClaim"; bindatcmd "code",strnpcinfo(3)+"::OnEditCode"; end; OnClaim: // if ( getgmlevel() ) end; mes "^FF0000 Enter a new promotional code."; input .@pc$; close2; query_sql "SELECT `nameid`, `amount` FROM `reward_codes` WHERE `code` = '" + escape_sql(.@pc$) + "'", .@item, .@amt; if ( !.@item ) dispbottom "Either invalid code or the code is already claimed by other people"; else { getitem .@item, .@amt; dispbottom "Promotional code successfully redeemed."; query_sql "DELETE FROM `reward_codes` WHERE `code` = '" + escape_sql(.@pc$) + "'"; query_logsql "INSERT INTO `rewardlogs` VALUES ( '" + getcharid(3) + "', '" + escape_sql(.@pc$) + "', NOW() )"; } end; OnEditCode: if ( getgmlevel() < 99 ) end; set .@choice$, "Setup a new promotional code:View existing codes:Delete exisiting codes:Cancel"; setarray .@length, 4,10; // <min>,<max> switch ( select( .@choice$ ) ) { case 1: input .@pcode$; if ( getstrlen( .@pcode$ ) < .@length[0] || getstrlen( .@pcode$ ) > .@length[1] ) { dispbottom "Codes must not be less than " +.@length[0]+ " and must be greater than " +.@length[1]+ "."; end; } mes "You have entered ^FF0000"+.@pcode$+"^000000 as the code."; mes "Are you sure?"; if ( select("Yes:No, thanks") - 1 ) end; query_sql "SELECT `code` FROM `reward_codes` WHERE `code` = '" + escape_sql(.@pcode$) + "'", .@pcode_exists; if ( .@pcode_exists ) { dispbottom "Sorry, that code already exist."; end; } mes "Please set a reward for the players who has entered the code."; input .@reward; next; if ( !.@reward || getitemname(.@reward) == "null" ) { dispbottom "Sorry, that is an invalid item id."; end; } set .@iname$, getitemname(.@reward); mes "Item number ^FF0000"+.@reward+"^000000"; mes "is equivalent to ^FF0000"+.@iname$+"^000000."; mes "Are you sure?"; next; if ( select("Yes:No, thanks") - 1 ) end; mes "How many ^FF0000"+.@iname$+"^000000.?"; input .@amount; next; if ( !.@amount ) { dispbottom "Sorry, that is an invalid amount number."; end; } mes "Are you sure?"; next; if ( select("Yes:No, thanks") - 1 ) end; query_sql "INSERT INTO `reward_codes` VALUES ( '" + escape_sql(.@pcode$) + "', '" + .@reward + "', '" + escape_sql(.@iname$) + "', '" + .@amount + "', NOW() )"; dispbottom "Done creating code!"; break; case 2: set .@nb, query_sql("SELECT code, item_name, amount FROM `reward_codes` ORDER BY time_created DESC LIMIT 20", .@code$, .@nid$, .@amount); if ( !.@nb ) { dispbottom "No exisiting codes."; end; } dispbottom "============================================="; dispbottom "============== EXISITING CODES =============="; dispbottom "============================================="; for(set .@i,0; .@i < .@nb; set .@i,.@i+1) dispbottom ""+.@code$[.@i]+" ( Reward: "+.@amount[.@i]+" "+.@nid$[.@i]+" ) "; dispbottom "============================================="; break; case 3: input .@dcode$; query_sql "SELECT `code` FROM `reward_codes` WHERE `code` = '" + escape_sql(.@dcode$) + "'", .@dcode_exists; if ( !.@dcode_exists ) { dispbottom "Promotional code not found."; end; } mes "Would you like to delete that code?"; next; if ( select("Yes:No, thanks") - 1 ) end; query_sql "DELETE FROM `reward_codes` WHERE `code` = '" + escape_sql(.@dcode$) + "'"; break; case 4: break; default: break; } close;} -
prontera,150,150,0 script Sample 100,{ if ( countiem( 501 ) < 10 || !countitem( 514 ) ) { mes "You need 10 apple and 1 grape"; close; } if ( !getcharid( 1 ) ) { mes "You don't have a party"; close; } if ( getpartyleader( getcharid( 1 ), 2 ) != getcharid( 0 ) ) { mes "You must be a party leader"; close; } delitem 501, 10; delitem 514, 1; warpparty "prontera",150,150,getcharid( 1 ); end;}
-
Why chrissy so cuteee <3
-
getmapxy( .@map$, .@x, .@y, 0 );warpparty .@map$, .@x, .@y, getcharid( 1 );
-
Advance Happy Birthday @malufett
-
map_zone_db.conf allows to restrict an ITEM TYPE
Patskie replied to AnnieRuru's topic in Suggestions
Cool ! +1 to this idea! -
You should elaborate on what you really want. If you want to be helped by others. Help yourself first. Express your request by giving a detailed description. A mere title wouldn't help that much on script people around.
-
How to determine whether an item is itembound items?
Patskie replied to 安赫尔's question in Script Support
mes "You currently have "+countbound()+" bounded items."; next; mes "The list of bounded items include:"; for(set .@i,0; .@i<getarraysize(@bound_items); set .@i,.@i+1) mes getitemname(@bound_items[.@i]); close; -
Let's try this one : - script LuckyPick -1,{ OnPCLoginEvent: .aid[getarraysize(.aid)] = getcharid(3); end; OnPCLogoutEvent: for ( .@i = 0; .@i < getarraysize(.aid); .@i++ ) { if ( .aid[.@i] == getcharid(3) ) deletearray .aid[.@i], 1; } end; OnMinute00: .@t++; if ( .@t % 2 ) end; .@i = rand(getarraysize(.aid)); if (attachrid(.aid[.@i])) getitem 501, 1, .aid[.@i]; end;} @EDIT : Trigger every 2 hours
-
Put delwaitingroom command before waitingroom command. Wew my net sucks. @Mumbles 10 minutes faster lol
-
[Request] 1 Points ( Daily Points ) - 1 Card
Patskie replied to ThyroDree's question in Script Requests
When a certain player kill a mob and that mob drop a card, the player gain points. -
Read the description of the topic starter before concluding that the answer is flawed or something
-
Congrats to those who got promoted. Keep up the good work
-
[Request] 1 Points ( Daily Points ) - 1 Card
Patskie replied to ThyroDree's question in Script Requests
AFAIK this can't be done through scripting alone. -
I think he is referring to bio lab quest.
-
Might probably want to use OnPCLoginEvent label?