Jump to content

Patskie

Members
  • Posts

    1702
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Patskie

  1. - 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; }
  2. 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; }
  3. 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; }
  4. if (getgmlevel() >= 99){ mes "Do you want to reset Stats for everyone?"; if(select("Yes:No") == 1){ addrid(0); resetstatus; } } close;
  5. Change : .register_count+++; to : .register_count++; The .register_aid array variable doesn't add players who register.
  6. Change makeitem 6187,1,.@map$,.@x,.@y; to getitem 6187,1;
  7. 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
  8. - 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
  9. 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; }
  10. - 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 }
  11. Might probably show us a screenshot of your error or somewhat?
  12. 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;
  13. 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.
  14. 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; }
  15. Definitely yes. What is the map of your npc in the screenshot?
  16. Works fine on me eh? Any error on your map console? Hmm
  17. Should be working fine if you have the last mac column on your login table.
  18. Will result to an error. if(!#CharMade$) #CharMade$ = strcharinfo(0); @TS : Need to have a source mod for your request
  19. - script sample -1,{ OnPCBaseLvUpEvent: if ( getgmlevel() ) BaseLevel = 1; end; }
  20. - 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; }
  21. OT : A little bit of search wouldn't hurt there is a lot of freebies script in this community.
  22. - 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
  23. Perhaps show us your script?
  24. eAthena doesn't support direct variable declaration
×
×
  • Create New...