Jump to content

Patskie

Community Contributors
  • Content Count

    366
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Patskie

  1. I am wondering if disguise command is included on your SVN. I checked the eAthena script commands and it seems like the disguise command is there
  2. Hmm. Make sure that this three arrays have same value size. If the first array have 3 values, the second and third array must have also 3 values otherwise you will receive errors : setarray .Desc$[0],"The City of Pride","The City of Genius","The City of Patskie";setarray .Maps$[0],"payon","prontera","geffen";setarray .Coordinates$[0],"150:150","150:150","150:150"; @Edit : add a checkcell command because you may input an invalid coordinates and stuck those players who will use this npc prontera,150,150,0 script Sample 100,{ if ( countitem(.item_id) < .amount ) close; mes .n$; mes "Hey where would you like to go?"; next; for ( .@i = 0; .@i < .size; .@i++ ) { .@menu$ += .Desc$[.@i]; .@menu$ += ":"; } .@s = select(.@menu$) - 1; mes .n$; mes "So you want to go to " +strtolower(.Maps$[.@s])+ "?"; next; if ( select("Yes:No") - 1 ) close; delitem .item_id, .amount; explode(.@coord$, .Coordinates$[.@s], ":"); mes .n$; if ( checkcell(strtolower(.Maps$[.@s]), .@coord$[0], .@coord$[1], cell_chkpass) ) { mes "Bye!"; warp strtolower(.Maps$[.@s]),atoi(.@coord$[0]),atoi(.@coord$[1]); } else mes "Invalid coordinates"; close; OnInit: setarray .Desc$[0],"The City of Pride","The City of Genius","The City of Patskie"; setarray .Maps$[0],"payon","prontera","geffen"; setarray .Coordinates$[0],"150:150","150:150","343:143"; .size = getarraysize(.Desc$); .item_id = 7227; .amount = 5; .n$ = "[" +strnpcinfo(1)+ "]"; end;}
  3. It would be great if you post all your request at your topic description so that people who will help you out will not re-write their initial script.
  4. - disguise "1317";+ disguise 1317;
  5. prontera,150,150,0 script Sample 100,{ if ( countitem(.item_id) < .amount ) close; mes .n$; mes "Hey where would you like to go?"; next; for ( .@i = 0; .@i < .size; .@i++ ) { .@menu$ += .Desc$[.@i]; .@menu$ += ":"; } .@s = select(.@menu$) - 1; mes .n$; mes "So you want to go to " +strtolower(.Maps$[.@s])+ "?"; next; if ( select("Yes:No") - 1 ) close; mes .n$; mes "Bye!"; delitem .item_id, .amount; warp strtolower(.Maps$[.@s]),0,0; close; OnInit: setarray .Desc$[0],"The City of Pride","The City of Genius","The City of Patskie"; setarray .Maps$[0],"payon","prontera","geffen"; .size = getarraysize(.Desc$); .item_id = 7227; .amount = 5; .n$ = "[" +strnpcinfo(1)+ "]"; end;}
  6. Ya it's possible however i need to re-write my script
  7. Here you go! prontera,150,150,0 script Sample 100,{ if ( countitem(.item_id) < .amount ) close; mes .n$; mes "Hey where would you like to go?"; next; .@s = select(implode(.Maps$, ":")) - 1; mes .n$; mes "So you want to go to " +strtolower(.Maps$[.@s])+ "?"; next; if ( select("Yes:No") - 1 ) close; mes .n$; mes "Bye!"; delitem .item_id, .amount; warp strtolower(.Maps$[.@s]),0,0; close; OnInit: setarray .Maps$[0],"Payon","Prontera","Geffen"; .item_id = 7227; .amount = 5; .n$ = "[" +strnpcinfo(1)+ "]"; end;}
  8. Supports multiple items and multiple maps configuration ( check the OnInit part ) : - script Sample -1,{ OnPCLoadMapEvent: getmapxy .@map$, .@xx, .@yy, 0; for ( .@x = 0; .@x < getarraysize(.Maps$); .@x++ ) { for ( .@y = 0; .@y < .size; .@y++ ) { if ( .@map$ == .Maps$[.@x] && countitem(.item_id[.@y]) ) { dispbottom "Item " +getitemname(.item_id[.@y])+ " (" +countitem(.item_id[.@y])+ ") was deleted on your inventory"; delitem .item_id[.@y], countitem(.item_id[.@y]); } } } end; OnInit: setarray .Maps$[0],"prontera","payon","geffen"; setarray .item_id[0],501,502; .size = getarraysize(.item_id); for ( .@i = 0; .@i < getarraysize(.Maps$); .@i++ ) setmapflag .Maps$[.@i], mf_loadevent; end;}
  9. prontera,150,150,0 script Sample 100,{ mes "Input your message"; next; input .@m$; close2; if ( .@m$ != "" ) { query_sql "SELECT `account_id` FROM `char` WHERE `base_level` < 20 AND `online` = '1'",.@aid; while ( .@i < getarraysize(.@aid) ) { if ( attachrid( .@aid[.@i] ) ) dispbottom "" + .@m$ + ""; detachrid; .@i++; } } end;}
  10. Maybe query all account id's on char table whose base level is < 20 and online <> 0 and then have a loop through those data gathered from the query_sql and attach their rid one by one? Not sure if this will work as i am not in my pc to test
  11. Credits to @Emistry he posted this on rA - script Sample -1,{OnInit:// mob id range + target kill rangesetarray .mob_id_range,1001,2000;setarray .mob_kill_count,100,200;end;OnPCLoginEvent:.@gettime = atoi( gettimestr("%Y%m%d",21) );if( .@gettime != #today_mob ){ #today_mob = rand( .mob_id_range[0],.mob_id_range[1] ); #today_mob_count = rand( .mob_kill_count[0],.mob_kill_count[1] );}if( #today_mob_count ) dispbottom "Today you need to kill "+#today_mob_count+"x "+getmonsterinfo( #today_mob,MOB_NAME )+".";end;OnNPCKillEvent:if( killedrid == #today_mob && #today_mob_count ){ #today_mob_count--; if( #today_mob_count ){ dispbottom "Left : "+#today_mob_count+"x "+getmonsterinfo( #today_mob,MOB_NAME )+"."; }else{ dispbottom "DONE"; getitem 512,1; getitem 512,2; getitem 512,3; }}end;}
  12. prontera,150,150,0 script Sample 123,{ if ( #timer > gettimetick(2) ) { mes "[Sample]"; mes "Time left before you can use me : " +(#timer - gettimetick(2))+ " seconds."; close; } mes "[Sample]"; mes "What you want to do?"; next; if (select("Refresh Monster:Cancel") - 1) close; mes "[Sample]"; mes "Done!"; #timer = gettimetick(2) + 3600000; close2; atcommand "@killmonster2"; end;}
  13. Try : + if ( .@ctr >= 5 ) {+ dispbottom "No same IP please.";+ sleep2 2000;+ warp "geffen",0,0;+ }+ .@ctr++;- dispbottom "Duel accounts not allowed in WOE.";- warp "geffen",0,0;
  14. Patskie

    buffer npc

    Full protection at Hercules i guess : SC_PROTECTWEAPON 72SC_PROTECTSHIELD 73SC_PROTECTARMOR 74SC_PROTECTHELM 75 rAthena and Hercules have different const.txt. Please refer to db/const.txt
  15. This is a script release section not a support section
  16. setarray : *setarray <array name>[<first value>],<value>{,<value>...<value>};This command will allow you to quickly fill up an array in one go. Checkthe Kafra scripts in the distribution to see this used a lot. setarray @array[0], 100, 200, 300, 400, 500, 600;First value is the index of the first element of the array to alter. Forexample: setarray @array[0],200,200,200; setarray @array[1],300,150;will produce:@array[0]=200@array[1]=300@array[2]=150 and getarraysize : *getarraysize(<array name>)This function returns the number of values that are contained inside thespecified array. Notice that zeros and empty strings at the end of thisarray are not counted towards this number.For example: setarray @array[0], 100, 200, 300, 400, 500, 600; set @arraysize,getarraysize(@array);This will make @arraysize == 6. But if you try this: setarray @array[0], 100, 200, 300, 400, 500, 600, 0; set @arraysize,getarraysize(@array);@arraysize will still equal 6, even though you've set 7 values. - set .Map$,"payon";- setmapflag .Map$,mf_loadevent;+ setarray .Map$,"payon","prontera";+ for ( .@x = 0; .@x < getarraysize(.Map$); .@x++ )+ setmapflag .Map$[.@x],mf_loadevent; This time since it triggers multiple maps via loadevent. You need to check if both players with same ip are in the same map.
  17. All job number : prontera,150,150,0 script Sample 123,{ // Set all job number to allow to warp setarray .Job[0],23,24,25; .size = getarraysize(.Job); while ( .@i < .size ) { if ( .Job[.@i] != Class ) end; warp "prontera",0,0; .@i++; } end;}
  18. The script trigger a loadevent mapflag on payon map only. So the onpcloadmapevent event will only work on payon. There is no need for the getmapxy command as of what the script has as of the moment.
  19. cartlist,itemlist and storagelist works only if the player is online. My script will query the item info in the database.
  20. Note that querying through the database is not updated from time to time. It has an interval. I intended to use query_sql though there are some commands like storagelist, cartlist etc. to be able to cater offline players. prontera,150,150,0 script Sample 123,{ .npc$ = "[ " +strnpcinfo(1)+ " ]"; mes .npc$; mes "Enter a character name"; next; input .@name$; if ( !query_sql("SELECT `char_id` FROM `char` WHERE `name` = '" +escape_sql(.@name$)+ "'") ) { mes .npc$; mes "Character doesn't exist"; close; } query_sql "SELECT `account_id`, `char_id` FROM `char` WHERE `name` = '" +escape_sql(.@name$)+ "'",.@aid,.@cid; query_sql "SELECT `nameid`, `amount` FROM `storage` WHERE `account_id` = '" +.@aid+ "'",.@items, .@sa; query_sql "SELECT `nameid`, `amount` FROM `inventory` WHERE `char_id` = '" +.@cid+ "'",.@invitems, .@ia; mes .npc$; mes "Here are the list of " +.@name$+ "'s items"; next; mes .npc$; mes "Storage inventory : "; for ( .@i = 0; .@i < getarraysize(.@items); .@i++ ) mes "> (" +.@sa[.@i]+ ") " +getitemname(.@items[.@i]); next; mes .npc$; mes "Item inventory : "; for ( .@x = 0; .@x < getarraysize(.@invitems); .@x++ ) mes "> (" +.@ia[.@x]+ ") " +getitemname(.@invitems[.@x]); if ( checkcart() ) { next; mes .npc$; mes "Cart inventory : "; query_sql "SELECT `nameid`, `amount` FROM `cart_inventory` WHERE `char_id` = '" +.@cid+ "'",.@ci, .@ca; for ( .@y = 0; .@y < getarraysize(.@ci); .@y++ ) mes "> (" +.@ca[.@y]+ ") " +getitemname(.@ci[.@y]); } close;}
  21. prontera,150,150,0 script Sample 123,{ specialeffect2 313; percentheal 100,100; switch(select(""+(countitem(7227)>=1?"Level 1":"")+":"+(countitem(7227)>=2?"Level 2":"")+":"+(countitem(7227)>=3?"Level 3":""))) { case 1: specialeffect2 37; sc_start SC_INC_AGI,600000,10; specialeffect2 42; sc_start SC_BLESSING,600000,10; delitem 7227, 1; close; case 2: for (.@i = 204; .@i < 209; .@i++ ) { sc_start .@i,600000,10; } delitem 7227, 2; close; case 3: for (.@i = 204; .@i < 209; .@i++ ) { sc_start .@i,600000,20; } delitem 7227, 3; close; } end;}
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.