-
Posts
1702 -
Joined
-
Last visited
-
Days Won
18
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Patskie
-
- script Sample -1,{ OnNPCKillEvent: if ( strcharinfo( 3 ) != "your gold room map" ) end; if ( GP < 8000 ) GP++; else message strcharinfo( 0 ),"You have reached maximum gold points. Exchange it now"; end; }
-
R>MOD Freebies that can choose STR/INT/DEX type etc
Patskie replied to chromus28's question in Script Requests
prontera,150,150,0 script Freebies 100,{ if ( #claimed ) end; mes "Choose your type"; next; switch( select( "Strength:Agility:Vitality:Intelligence:Dexterity:Luck" ) ) { case 1: //getitem <item id>,<amount> //getitem <item id>,<amount> //... break; case 2: //getitem <item id>,<amount> //getitem <item id>,<amount> //... break; case 3: //getitem <item id>,<amount> //getitem <item id>,<amount> //... break; case 4: //getitem <item id>,<amount> //getitem <item id>,<amount> //... break; case 5: //getitem <item id>,<amount> //getitem <item id>,<amount> //... break; case 6: //getitem <item id>,<amount> //getitem <item id>,<amount> //... break; default: break; } mes "Good luck!"; set #claimed, 1; close; } -
prontera,150,150,0 script Sample 100,{ OnInit: setarray .Buffs[0], SC_BLESSING, SC_KYRIE, SC_ANGELUS; setarray .Effects[0], EF_BLESSING, EF_KYRIE, EF_ANGELUS; set .Size, getarraysize( .Buffs ); set .Buff, 0; // 1 to enabled buff, 0 otherwise set .Price, 100000; defpattern 1, "buff please", "OnBuff"; activatepset 1; end; OnBuff: if ( Zeny < .Price ) { npctalk "Can't buff you " + strcharinfo( 0 ) + ", You don't have zeny"; end; } Zeny -= .Price; percentheal 100, 100; specialeffect2 EF_HEAL2; if ( .Buff ) { for ( .@i = 0; .@i < .Size; .@i++ ) { specialeffect2 .Effects[ .@i ]; sc_start .Buffs[ .@i ], 300000, 10; } } end; }
- 1 reply
-
- 1
-
if (getgmlevel() >= 99){ mes "Do you want to reset Stats for everyone?"; if(select("Yes:No") == 1){ addrid(0); resetstatus; } } close;
-
Change : .register_count+++; to : .register_count++; The .register_aid array variable doesn't add players who register.
-
Change makeitem 6187,1,.@map$,.@x,.@y; to getitem 6187,1;
-
I don't have enough time to make this though i can give you a hint on how to do this : 1. if ( BaseLevel < 255 ) { mes "You must be level 255 in order to talk to me"; close; } if ( !getcharid( 2 ) ) { mes "You don't have guild"; close; } query_sql "SELECT `guild_lv` FROM `guild` WHERE `guild_id` = '"+ getcharid( 2 ) +"'",.@guild_lv; if ( .@guild_lv < 50 ) { mes "Must be guild level 50 in order to talk to me"; close; } 2. getguildmember getcharid( 2 ), 1; getguildmember getcharid( 2 ), 2; for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) if ( isloggedin( $@guildmemberaid[ .@i ], $@guildmembercid[ .@i ] ) ) .@count++; if ( .@count < 5 ) { mes "Must have 5 guild members online"; close; } else { if ( countitem( 7227 ) < 100 ) { mes "Must have 100x " + getitemname( 7227 ); close; } delitem 7227, 100; } 3, 4, 5 : setarray .Mobs[0],1832; setarray .Map$[0],"thor_v03"; setarray .XCoord[0],150; setarray .YCoord[0],150; .size = getarraysize( .Mobs ); .@menu$ = ""; for ( .@i = 0; .@i < .size; .@i++ ) { .@menu$ += getmonsterinfo( .Mobs[ .@i ] , 0 ); .@menu$ += ":"; } .@s = select( .@menu$ ) - 1; mes "So you want to hunt " + getmonsterinfo( .Mobs[ .@s ], 0 ) + "?"; next; if ( select( "Yes:No" ) - 1 ) close; warp .Map$[ .@s ], .XCoord[ .@s ], .YCoord[ .@s ]; monster .Map$[ .@s ], .XCoord[ .@s ], .YCoord[ .@s ], "--ja--", .Mobs[ .@s ], 1, strnpcinfo( 3 )+"::OnMVPKill"; close; OnMVPKill: getmapxy( .@map$, .@x, .@y, 0 ); announce "The " + getguildname( getcharid( 2 ) ) + " guild have killed " + getmonsterinfo( killedrid, 0 ) + " in " + .@map$ + " " + .@x + " " + .@y + ".",0; end; Dunno though if this will post an error since i am not in my laptop to make this
-
npc/custom
-
- script Sample -1,{ OnInit: set .amount, 40; // amount of item to shower set .item_id, 7227; // item id to shower set .map$, "prontera"; // map to shower bindatcmd "itemshower",strnpcinfo(3)+"::OnShower"; end; OnShower: while ( .count < .amount ) { do { .@x = rand(1,500); .@y = rand(1,500); } while (!checkcell(.map$,.@x,.@y,cell_chkpass)); makeitem .item_id,1,.map$,.@x,.@y; set .count, .count + 1; } set .count, 0; end; } @itemshower to trigger the command
-
getpartymember getcharid( 1 ), 2; for ( set .@i, 1; .@i < $@partymembercount; set .@i , .@i + 1 ) { query_sql "INSERT INTO `laddertest` ( `accountid` ) VALUES ('" +$@partymemberaid[.@i]+ "')"; announce $@partymemberaid[.@i],bc_all,0x00FF00; }
-
- script Sample -1,{ OnNPCKillEvent: .@i = rand( getarraysize( .i ) ); getmapxy( .@map$, .@x, .@y, 0 ); if ( rand( 100 ) < .@i ) makeitem .i[ .@i ], 1, .@map$, .@x, .@y; end; OnInit: setarray .i[0],607,608,609; // item to drop setarray .c[0],5,3,2; // chance }
-
Might probably show us a screenshot of your error or somewhat?
-
Script that welcomes newly created character
Patskie replied to Princess_anne's question in Scripting Support
Colors are in 0xRRGGBB format. If you don't know what you are doing then i suggest you search for a tool in the internet. There are too many tools sites for this. - announce strcharinfo(0)+ "has joined server RO! Welcome to the server!",0; + announce strcharinfo(0)+ "has joined server RO! Welcome to the server!",0,0xFFFF00; -
My script is just a template. What TOD said is that i should instead declare a variable on the OnInit part and give the array size of .r and .p into those 2 variables and access them on the for loop instead. Well in terms of processing TOD script is more efficient than mine.
-
prontera,150,150,0 script Sample 100,{ for ( .@i = 0; .@i < getarraysize( .r ); .@i += 2 ) { if ( countitem( .r[ .@i ] ) < .r[ .@i + 1 ] ) { mes "Lack of requirements"; close; } } for ( .@i = 0; .@i < getarraysize( .r ); .@i += 2 ) delitem .r[ .@i ], .r[ .@i + 1 ]; for ( .@i = 0; .@i < getarraysize( .p ); .@i += 2 ) getitem .p[ .@i ], .p[ .@i + 1 ]; mes "Nice!"; close; OnInit: // item id, amount ( r = requirements | p = prize ) setarray .r[0],7227,5,7179,5; setarray .p[0],1202,1,5013,1; end; }
-
Definitely yes. What is the map of your npc in the screenshot?
-
-
Should be working fine if you have the last mac column on your login table.
-
Will result to an error. if(!#CharMade$) #CharMade$ = strcharinfo(0); @TS : Need to have a source mod for your request
-
- script sample -1,{ OnPCBaseLvUpEvent: if ( getgmlevel() ) BaseLevel = 1; end; }
-
- script Sample -1,{ OnNPCKillEvent: if ( getmonsterinfo( killedrid, 22 ) ) { for ( .@i = 0; .@i < getarraysize( .items ); .@i += 3 ) { if ( rand( 100 ) < .items[ .@i + 2 ] ) { getitem .items[ .@i ], .items[ .@i + 1 ]; announce "Wow! " +strcharinfo( 0 )+ " has obtained " +getitemname( .items[ .@i ] )+ " [" +.items[ .@i + 1 ]+ "] from " +getmonsterinfo(killedrid, 0)+ ".",0; } } } end; OnInit: // <item id>,<amount>,<chance> setarray .items[0],14232, 2, 5, 7615, 1, 3, 7227, 1, 2, 7179, 1, 1; end; }
-
OT : A little bit of search wouldn't hurt there is a lot of freebies script in this community.
-
- script Sample -1,{ OnPCLoadMapEvent: getmapxy( .@map$, .@x, .@y, 0 ); if ( .@map$ == "guild_vs1" && getmapusers( "guild_vs1" ) ) { message strcharinfo( 0 ),"Map is full"; sleep2 3000; warp "SavePoint", 0, 0; } end; } guild_vs1 mapflag loadevent
-
Perhaps show us your script?
-
eAthena doesn't support direct variable declaration