Jump to content

Skorm

Forum Moderator
  • Posts

    1282
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Skorm

  1. It feels fine to me but unfortunately I'm not able to test it under circumstances that would matter most... Like pvp etc. Edit: If anyone wants like a visual representation of what this patch kind of does...
  2. I like this better plus git sends all kinds of updates and bugs to my email is convenient.
  3. Any improvements to usability are welcomed. Although the "official" algorithm used for moving is a hindrance at best so official isn't always better in my book. Good job. Edit: I read this twice and it seems sarcastic, but I genuinely approve of this change.
  4. I was thinking about it and someone might be exploiting the npc by dropping or storing the items in the middle of the transaction... Try this instead. prontera,101,101,5 script exchange_test 100,{ getinventorylist; .@len = @inventorylist_count; copyarray .@inv_list[0], @inventorylist_id[0], .@len; setarray .@items, 501, 502, 503; setarray .@exchange, 504, 506, 507; .@l_2 = getarraysize(.@items); .@l_3 = getarraysize(.@exchange); for( .@a = 0; .@a < .@len; .@a++ ) { for( .@b = 0; .@b < .@l_2; .@b++ ) if( .@inv_list[.@a] == .@items[.@b] ) .@selection$ = .@selection$ + getitemname(.@inv_list[.@a]) + ":"; .@selection$ = .@selection$ + ":"; } mes "Pick from the items you'd like to exchange."; .@menu = select(.@selection$)-1; mes "You've selected "+getitemname(.@inv_list[.@menu])+". What would you like to exchange it with?"; for( .@a = 0; .@a < .@l_3; .@a++ ) .@s_2$[getarraysize(.@s_2$)] = getitemname(.@exchange[.@a]); .@s_3$ = implode( .@s_2$, ":" ); .@menu2 = select(.@s_3$)-1; if( countitem(.@inv_list[.@menu]) >= 1 ) { delitem .@inv_list[.@menu], 1; getitem .@exchange[.@menu2], 1; } else mes "Something went wrong."; close; }
  5. I set the item and exchange into this setarray .@items, 20286, 20287, 20288, 20289, 20290, 20291, 20292; setarray .@exchange, 20286, 20287, 20288, 20289, 20290, 20291, 20292; Just make sure all your items exist in your database to check use @item <item_id> if it doesn't work then they will cause that error.
  6. Skorm

    @autoattack

    It might be easier to just disable vending on those maps? anthell mapflag novending This might work though... - script AT_Command -,{ OnAT_Command: if( !checkvending() ) atcommand "@autoattack"; else message strcharinfo(0), "This command can't be used while vending."; end; OnInit: bindatcmd "autoattack","AT_Command::OnAT_Command"; }
  7. initnpctimer; Doesn't automatically attach the player. Also even if the player was attached it wouldn't matter because the timer is a different instance of that npc all together.
  8. Yeah unless you're using harmony and mac address.
  9. Right the original shop is pretty old but still that's not a very good way to add a restriction to it... Instead do what I did. Create an array with the ids and count them then you can control how many times a player is killed and it adds an extra layer of protection because the player can't farm on 2 different characters.
  10. I don't see how that actually has like a player based restriction xD. Test it? Yes this is what you wanted... You can extend the number of players who were killed for the script to remember and also how lean or strict the condition is...
  11. Perhaps a little more information is needed? But maybe something along these lines or? getinventorylist; .@len = @inventorylist_count; copyarray .@inv_list[0], @inventorylist_id[0], .@len; setarray .@items, 501, 502, 503; setarray .@exchange, 504, 506, 507; .@l_2 = getarraysize(.@items); .@l_3 = getarraysize(.@exchange); for( .@a = 0; .@a < .@len; .@a++ ) { for( .@b = 0; .@b < .@l_2; .@b++ ) if( .@inv_list[.@a] == .@items[.@b] ) .@selection$ = .@selection$ + getitemname(.@inv_list[.@a]) + ":"; .@selection$ = .@selection$ + ":"; } mes "Pick from the items you'd like to exchange."; .@menu = select(.@selection$)-1; mes "You've selected "+getitemname(.@inv_list[.@menu])+". What would you like to exchange it with?"; for( .@a = 0; .@a < .@l_3; .@a++ ) .@s_2$[getarraysize(.@s_2$)] = getitemname(.@exchange[.@a]); .@s_3$ = implode( .@s_2$, ":" ); .@menu2 = select(.@s_3$)-1; delitem .@inv_list[.@menu], 1; getitem .@exchange[.@menu2], 1;
  12. I like it, cute~
  13. Hmm... - shop custom_seller2 -1,501:500 prontera.gat,95,99,5 script PK Points Dealer 100,{ mes "[PK Points Dealer]"; mes "I will sell you items for PK points."; mes "Each time you kill a player on "+.map$+" you'll get 1 PK point to spend here!"; next; mes "[PK Points Dealer]"; mes "You currently have [^0000ff"+pk_points+"^000000] PK points to spend."; callshop "custom_seller2",1; npcshopattach "custom_seller2"; end; OnBuyItem: for(set .@i,0; .@i<getarraysize(.customs); set .@i,.@i+1) { for(set .@d,0; .@d<getarraysize(@bought_nameid); set .@d,.@d+1) { if(@bought_nameid[.@d]==.customs[.@i]) { if(checkweight(@bought_nameid[.@d],@bought_quantity[.@d])) { if(pk_points >= .Price[.@i]*@bought_quantity[.@d]) { set pk_points, pk_points - .Price[.@i]*@bought_quantity[.@d]; getitem @bought_nameid[.@d],@bought_quantity[.@d]; } else dispbottom "You don't have enough PK points to purchase that item."; } else dispbottom "Purchasing these items will put you over the weight limit!"; } } } deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); close; OnPCKillEvent: if( strcharinfo(3) != .map$ ) end; copyarray( @killed$[1], @killed$[0], .saved_l-1 ); @killed$ = ""+killedrid; if( countstr( implode( @killed$, "|" ), ""+killedrid, 0 ) <= .rstrk_l ) { pk_points++; dispbottom "You've gained one point! Your total is ["+pk_points+"] PK point(s)."; } end; OnInit: set .map$, "guild_vs3"; set .saved_l, 3; //Length of saved ids can be up to 127. set .rstrk_l, 2; //Level of restriction. setarray .customs[0], 12103, 607, 678; // Enter the ID of customs here... setarray .Price[0], 20 , 40 , 300; // Price for each custom here... npcshopitem "custom_seller2", 0 , 0; // Don't touch any coding beyond here.. for( set .i,0; .customs[.i]; set .i,.i+1 ) npcshopadditem "custom_seller2",.customs[.i],.Price[.i]; end; }
  14. Well he would have to change it in a few other places as well... Why not just use rAthena. x_x
  15. Here's a quick example npc I'll probably finish this one up later today. prontera,150,150,5 script Anti-bot-tests#1 100,{ mes "[^FF0000Anti Bot Checking^000000]"; mes "Are you a bot?"; mes "You have 5 minutes to follow the directions bellow and verify your a real player."; mes "Choose the correct colour and number to enter."; next; .@correct = rand(.length); copyarray .@colour$, .colour$, getarraysize(.colour$); for( .@a = 0; .@a < .length; .@a++ ) { for( .@b = 0; .@b < .numbers; .@b++ ) .@part$[.@b] = ""+rand(10); .@r = rand(getarraysize(.@colour$)); .@answers$[.@a] = ( .@a_c$[.@a] = .@colour$[.@r] )+( .@parts$[.@a] = implode(.@part$,""))+"^000000"; deletearray .@colour$[.@r], 1; mes " "+.@answers$[.@a]; } while( getstrlen(.@c$) < .numbers ) .@c$ = .@c$ + "#"; mes "The correct answer is: "+.@a_c$[.@correct]+.@c$; set .@input$,""; input( .@input$ ); if( compare( .@answers$[.@correct], .@a_c$[.@correct]+.@input$+"^000000" ) ) { mes "Correct!"; } else { mes "Wrong!"; } close; OnInit: setarray .colour$, "^00FF00", "^FF0000", "^0000FF", "^0FF0FF", "^CCCCCC", "^CBCBCB"; .length = 6; //Length of the list. .numbers = 6; //Length of the numbers. }
  16. This can also be done with an array. Up to 128 npcs. prontera,100,100,5 script Fishing#0 100,{ .@a = atoi( strnpcinfo(2) ); if( .init[ .@a ] ) end; .init[ .@a ] = 1; progressbar "0xFF0000",5; getitem 501,1; .init[ .@a ] = 0; } prontera,101,100,5 duplicate(Fishing#0) Fishing#1 100 prontera,102,100,5 duplicate(Fishing#0) Fishing#2 100 prontera,103,100,5 duplicate(Fishing#0) Fishing#3 100
  17. Thank you I'm glad you like it.
  18. View File guildgetitem2 & guildgetitembound2 This command sends items to the guild storage without the need of server restart. Example: prontera,100,100,5 script guildgetitem2 100,{ //guildgetitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>}; switch ( guildgetitem2(1218, 1, 1, 1, 10, 4305, 0, 0, 0) ) { case 1: dispbottom "Item added to your guild storage."; end; case 0: dispbottom "Unknown Error."; break; case -1: dispbottom "Cannot open both storages."; break; case -2: dispbottom "Player doesn't have a guild."; break; case -3: dispbottom "Player doesn't have a guild storage."; break; case -4: dispbottom "Guild storage being used by someone else."; break; case -5: dispbottom "Guild storage is full."; break; } end; } Works much like getitem2 and it uses the attached players guildstorage. Submitter Skorm Submitted 10/18/2014 Category Source Modifications Video Content Author Skorm  
  19. Skorm

    Help! edit

    Here's an updated version... @follow.patch
  20. Version v1.5

    388 downloads

    This command sends items to the guild storage without the need of server restart. Example: prontera,100,100,5 script guildgetitem2 100,{ //guildgetitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>}; switch ( guildgetitem2(1218, 1, 1, 1, 10, 4305, 0, 0, 0) ) { case 1: dispbottom "Item added to your guild storage."; end; case 0: dispbottom "Unknown Error."; break; case -1: dispbottom "Cannot open both storages."; break; case -2: dispbottom "Player doesn't have a guild."; break; case -3: dispbottom "Player doesn't have a guild storage."; break; case -4: dispbottom "Guild storage being used by someone else."; break; case -5: dispbottom "Guild storage is full."; break; } end; } Works much like getitem2 and it uses the attached players guildstorage.
    Free
  21. Maybe try it like... if (isloggedin(.@acc[.@j],.@char[.@j])) { if ( !checkvending( rid2name(.@acc[.@j]) ) ) { for(set .@k,0; .@k<getarraysize(.Reward); set .@k,.@k+2) getitem .Reward[.@k], .Reward[.@k+1], .@acc[.@j]; message rid2name(.@acc[.@j]),"You have been rewarded for conquering "+getcastlename(.Castles$[.@i])+"."; } } } }
  22. Skorm

    Heal zone

    I think you have the right idea but maybe like this? prontera,155,313,5 script Box_Healer 742,5,5,{ end; // <-- Remove this line if you want clicking the npc to work as well. OnTouch: if( MaxHp == Hp && MaxSp == Sp ) npctalk "You don't need me."; if( MaxHp != Hp ) { itemheal MaxHp, 0; specialeffect2 209; } if( MaxSp != Sp ) { itemheal 0, MaxSp; specialeffect2 208; } }
  23. Limited is a poor choice in words... Complicated but not necessarily limited is how I would describe it.
  24. This is probably a pretty convoluted way of doing it... But I've found with SQL things are either extremely easy or nearly impossible. LOL DELIMITER $$ DROP PROCEDURE IF EXISTS dowhile $$ CREATE PROCEDURE dowhile() BEGIN DECLARE v1 INT DEFAULT (SELECT COUNT(*) FROM `item_db2_re` WHERE `equip_locations` & 769 AND `script` IS NULL); DECLARE v2 INT DEFAULT FLOOR( 1 + RAND( ) * 10 ); DECLARE v3 INT DEFAULT FLOOR( 1 + RAND( ) * 100 ); WHILE v1 > 0 DO CASE FLOOR( 1 + RAND( ) * 2 ) WHEN 1 THEN UPDATE `item_db2_re` SET `script` = CONCAT( 'bonus bStr,', v2, ';' ) WHERE `equip_locations` & 769 AND `script` IS NULL ORDER BY RAND() LIMIT 1; WHEN 2 THEN UPDATE `item_db2_re` SET `script` = CONCAT( 'bonus2 bAddEle,', v2, ',', v3, ';' ) WHERE `equip_locations` & 769 AND `script` IS NULL ORDER BY RAND() LIMIT 1; END CASE; SET v1 = v1 - 1; SET v2 = FLOOR( 1 + RAND( ) * 10 ); SET v3 = FLOOR( 1 + RAND( ) * 100 ); END WHILE; END $$ CALL dowhile();
  25. The script isn't exactly optimal but I removed the previous message and added a download link. Sorry about that.
×
×
  • Create New...