Jump to content

Winterfox

Members
  • Content Count

    403
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Winterfox

  1. @@Vlync I updated it, copy it from above.
  2. @@Vlync prontera,142,169,5 script Lira 811,{ function checkw; mes .npc$; mes "As l can see you, found your way to me ^0000ff"+strcharinfo(0)+"^000000."; mes "although they require many rare ^FF0000jewels^000000 to make."; mes " "; mes "What can l mix for you?"; next; switch( select( " - mix ^AA6A04Mjolnir^000000: - mix ^AA6A04Sleipnir^000000: - mix ^AA6A04Brisingamen^000000: - mix ^AA6A04Gleipnir^000000: - mix ^AA6A04Megingjard^000000" ) ) { case 1: mes .npc$; mes ( (.ShowID ) ? "(20030) " : "" ) + "^3355FFMjolnir^000000 is the mighty Hammer of Thor."; mes " "; setarray .@Items[0],20030,1531,2,984,20,985,5,969,40,7074,2,7075,4,7078,5,7087,5,7089,5; break; case 2: mes .npc$; mes ( (.ShowID ) ? "(20029) " : "" ) + "^3355FFSleipnir^000000 are boots made after Odin's War Horse."; mes " "; setarray .@Items[0],20029,2406,2,984,1,969,20,985,10,7076,3,7079,5,7083,3,7086,3; break; case 3: mes .npc$; mes ( (.ShowID ) ? "(2630) " : "" ) + "^3355FFBrisingammen^000000 is the magical Necklace of Freyja, goddess of Beauty."; mes " "; setarray .@Items[0],2630,2603,1,726,2,722,3,727,10,723,5,969,20,7073,4,7077,4,7088,3,7090,3,7092,3; break; case 4: mes .npc$; mes ( (.ShowID ) ? "(7058) " : "" ) + "The ^3355FFGleipnir^000000 is a light yet strong rope required to make ^3355FFMegingjard^000000"; mes " "; setarray .@Items[0],7058,7080,4,7081,5,7082,4,7084,3,7085,3; break; case 5: mes .npc$; mes ( (.ShowID ) ? "(20021) " : "" ) + "The ^3355FFMegingjard^000000 is the powerful Belt of Thor."; setarray .@Items[0],20021,7058,1,2601,1,969,10,726,10,984,5; break; } set .@nr, 0; mes "^FF0000The ltems i need are as follows:^000000"; for(set .@i, 1; .@i <= getarraysize( .@Items ); set .@i, .@i + 2 ) { set .@color$, "72E300"; set .@itemCount, countitem( .@Items[ .@i ] ); if ( .@itemCount < .@Items[ .@i + 1 ] ) { set .@nr, 1; set .@color$, "FF0000"; } mes "^" + .@color$ + .@Items[.@i + 1] + " x " + ( (.ShowID ) ? "(" + .@Items[ .@i ] + ") " : "" ) + getitemname( .@Items[ .@i ] ) + " " + .@itemCount + "/" + .@Items[ .@i + 1 ] + "^000000"; } if (.@nr) close; next; mes .npc$; mes "Do you want " + ( ( .ShowID ) ? "(" + .@Items[ 0 ] + ") " : "" ) + "^3355FF" + getitemname( .@Items[ 0 ] ) +" ^000000?"; next; if(select(" - Yes, Please: - No, Thanks")== 2) { mes .npc$; mes "Very well then, please go back, if you change your mind."; close; } checkw .@Items[0]; mes .npc$; mes "Here is your " + ( ( .ShowID ) ? "(" + .@Items[ 0 ] + ") " : "" ) + "^3355FF"+getitemname(.@Items[0])+"^000000."; mes "lt may serve you well."; for( set .@i, 1; .@i <= getarraysize( .@Items ); set .@i,.@i + 2 ) delitem .@Items[ .@i ], .@Items[ .@i + 1 ]; getitem .@Items[0],1; close; end; OnInit: set .npc$, "^0099CCLira - Godlike Creator^000000"; set .ShowID,1; end; function checkw { if( !checkweight( getarg(0), 1) ) { mes .npc$; mes "Your weight is too high!"; close; } return; }}
  3. @@Vlync You need to call your weight check before you start to delete the items even though it might be that the weight is low enough after the deletion of some items, if it isn't for some reason people would loose their items but get nothing. prontera,142,169,5 script Lira 811,{ function checkw; .npc$ = "^0099CCLira - Godlike Creator^000000"; mes .npc$; mes "As l can see you, found your way to me ^0000ff"+strcharinfo(0)+"^000000."; mes "although they require many rare ^FF0000jewels^000000 to make."; mes " "; mes "What can l mix for you?"; next; switch( select( " - mix ^AA6A04Mjolnir^000000: - mix ^AA6A04Sleipnir^000000: - mix ^AA6A04Brisingamen^000000: - mix ^AA6A04Gleipnir^000000: - mix ^AA6A04Megingjard^000000" ) ) { case 1: mes .npc$; mes "^3355FFMjolnir^000000 is the mighty Hammer of Thor."; mes " "; setarray .@Items[0],20030,1531,2,984,20,985,5,969,40,7074,2,7075,4,7078,5,7087,5,7089,5; break; case 2: mes .npc$; mes "^3355FFSleipnir^000000 are boots made after Odin's War Horse."; mes " "; setarray .@Items[0],20029,2406,2,984,1,969,20,985,10,7076,3,7079,5,7083,3,7086,3; break; case 3: mes .npc$; mes "^3355FFBrisingammen^000000 is the magical Necklace of Freyja, goddess of Beauty."; mes " "; setarray .@Items[0],2630,2603,1,726,2,722,3,727,10,723,5,969,20,7073,4,7077,4,7088,3,7090,3,7092,3; break; case 4: mes .npc$; mes "The ^3355FFGleipnir^000000 is a light yet strong rope required to make ^3355FFMegingjard^000000"; mes " "; setarray .@Items[0],7058,7080,4,7081,5,7082,4,7084,3,7085,3; break; case 5: mes .npc$; mes "The ^3355FFMegingjard^000000 is the powerful Belt of Thor."; setarray .@Items[0],20021,7058,1,2601,1,969,10,726,10,984,5; break; } mes "^FF0000The ltems i need are as follows:^000000"; for(set .@i, 1; .@i <= getarraysize( .@Items[0] ); set .@i, .@i + 2 ) { mes "^0000FF" + .@Items[.@i+1] + "^000000 x ^AA6A04" + getitemname( .@Items[ .@i ] ) + "^000000"; if ( countitem( .@Items[ .@i ] ) < .@Items[ .@i + 1 ] ) set .@nr, 1; } if (.@nr) close; next; mes .npc$; mes "Do you want ^3355FF"+getitemname(.@Items[0])+"^000000?"; next; if(select(" - Yes, Please: - No, Thanks")== 2) { mes .npc$; mes "Very well then, please go back, if you change your mind."; close; } checkw .@Items[0]; mes .npc$; mes "Here is your ^3355FF"+getitemname(.@Items[0])+"^000000."; mes "lt may serve you well."; for( set .@i, 1; .@i <= getarraysize( .@Items ); set .@i,.@i + 2 ) delitem .@Items[ .@i ], .@Items[ .@i + 1 ]; getitem .@Items[0],1; close; function checkw { if( !checkweight( getarg(0), 1) ) { mes .npc$; mes "Your weight is too high!"; close; } return; }}
  4. @@Host32 If the type thing is only for weapons you could check if the equip is a weapon with getiteminfo( .@equipmentId, 2 ), if its 4 its a weapon and to get the weapon type you can use getiteminfo( .@equipmentId, 14 ) that will return the view id of the item, but for weapons it determines what type they are. You can read that up here: http://herc.ws/wiki/Custom_Items Formatting here messes to much with that script, take a look here: http://pastebin.com/QR88u3Ss
  5. @newbieppl Did you diff patch your client for increased zoom or similiar?
  6. If you did that: http://herc.ws/wiki/Edit_Max_Level you atleast set up the server properly. For the aura effect you will need to apply a diff patch, since those values are hardcoded into your client.
  7. - script Manager -1,{ OnDay0101: announce "Januar!",bc_blue|bc_all; end; OnDay0201: announce "Februar!",bc_blue|bc_all; end; OnDay0301: announce "März!",bc_blue|bc_all; end; OnDay0401: announce "April!",bc_blue|bc_all; end; OnDay0501: announce "Mai!",bc_blue|bc_all; end; OnDay0601: announce "Juni!",bc_blue|bc_all; end; OnDay0701: announce "Juli!",bc_blue|bc_all; end; OnDay0801: announce "August!",bc_blue|bc_all; end; OnDay0901: announce "September!",bc_blue|bc_all; end; OnDay1001: announce "Oktober!",bc_blue|bc_all; end; OnDay1101: announce "November!",bc_blue|bc_all; end; OnDay12901: announce "Dezember!",bc_blue|bc_all; end;}
  8. I experimented with that a bit it is possible to do the first part in a script. Might be buggy though, didn't really test it but it should be able to do what you want. Even though i think performance wise it will be too taxing to be really of use in a live environment. I still think a plugin will do a lot better. The second one would be also possible but i lost the motivation too put in more work atm. It also would add even more layers of performance eaters. But maybe you can use it as prototype to test the idea out or something. - script CARD_CHECK -1,{ OnInit: // Card ID setarray .@cardIds$, 1, 2, 3, 4, 5, 6; .@cardIdPattern$ = implode( .@cardIds$, ":" ); while( sleep( 5000 ) ) { .@resCount = query_sql( "SELECT `account_id` FROM `char` WHERE online = 1", .@accountIds ); for( .@i = 0; .@i < .@resCount; .@i++ ) { if( attachrid( .@accountIds[ .@i ] ) ) { for( .@y = 1; .@y < 20; .@y++ ) { if( getequipisequiped( .@y ) ) { .@equipmentId = getequipid( .@y ); .@eqSlotSpace = getitemslots( .@equipmentId ); .@eqOccupiedSlots = getequipcardcnt( .@y ); .@eqInfoCards$[ 0 ] = getequipcardid( .@y, 0 ); .@eqInfoCards$[ 1 ] = getequipcardid( .@y, 1 ); .@eqInfoCards$[ 2 ] = getequipcardid( .@y, 2 ); .@eqInfoCards$[ 3 ] = getequipcardid( .@y, 3 ); } for( .@x = 0; .@x < 4; .@x++ ) { if( compare( .@cardIdPattern$, .@eqInfoCards$[ .@x ] ) ) .@eqOccupiedSlots += 1; } if( ( .@eqSlotSpace - .@eqOccupiedSlots ) > 0 ) { successremovecards .@y; dispbottom "You tried to add more cards to " + getequipname( .@y ) + " as allowed."; } } } } } end;}
  9. @@Host32 I would say that is definitly a request for a plugin. I can't think of a way to control this kind of behaviour in a script.
  10. @@latheesan setarray takes a list of arguments, you just gave him the first element of your accountinfo array. To get a copy of the array in your function into your npc you need to copy it. You also should put config values in a oninit segement in a script that can't be directly called it will never get executed otherwise. // Main Script- script L_Test -1,{ OnInit: // Configuration set .useLastMAC,0; end; // When player logins into game OnPCLoginEvent: // Load account info copyarray @accountInfo$, callfunc("L_GetAccountInfo"), 3; debugmes "[OnPCLoginEvent] account_id = " + @accountInfo$[0]; debugmes "[OnPCLoginEvent] last_ip = " + @accountInfo$[1]; debugmes "[OnPCLoginEvent] last_mac = " + @accountInfo$[2]; end; }// Helper Function: Load Account Info// Returns Array (0 = Account ID | 1 = Last IP | 2 = Last Mac)function script L_GetAccountInfo { setarray .@accountInfo$[0], getcharid( 3 ); if ( getvariableofnpc( .useLastMAC, "L_Test" ) == 1 ) { query_sql( "SELECT last_ip, last_mac FROM login WHERE account_id = " + .@accountInfo$[0], .@last_ip$, .@last_mac$ ); setarray .@accountInfo$[1], .@last_ip$, .@last_mac$; } else { query_sql("SELECT last_ip FROM login WHERE account_id = "+ .@accountInfo$[0], .@last_ip$); setarray .@accountInfo$[1],.@last_ip$, "-"; } debugmes "[L_GetAccountInfo] account_id = " + .@accountInfo$[0]; debugmes "[L_GetAccountInfo] last_ip = " + .@accountInfo$[1]; debugmes "[L_GetAccountInfo] last_mac = " + .@accountInfo$[2]; return .@accountInfo$;}
  11. @@latheesan You are welcome, i am glad that i could help you out.
  12. @@latheesan The function needs to be in "", you also should use = instead of set. You also don't need to pass strcharinfo, you can call it in your function. // Main Script- script L_Test -1,{ // When script starts OnInit: // Configuration set .npc$,"[ Test NPC ] : "; end; // When player logins into game OnPCLoginEvent: dispbottom( .npc$ + callfunc( "L_SayHello" ) ); end;}function script L_SayHello { return "Hello "+ strcharinfo( 0 );}
  13. Try to update DirectX and your Graphicscard driver.
  14. This one will be hard, even you have patch the mac_addres patch the mac address will send 000000000000 for player who use usb stick modem or , the only way is using hackshield that was around to buy, Nothing of this really matters. Dynamic IPs change by nature, mac addresses can easily be spoofed, even hardware ids can be spoofed. Also networks work with mac addresses they are needed to transport data between 2 devices, so its impossible that any device you use to communicate with another doesn't have a mac address. The just are valid from one device to another, that is why we have ip addresses that determine the full location for example of a device you want to communicate with over the internet.
  15. @@Aeromesi Did you emulate the map? You need to use the emulated name not the original map name. Also you did use .@instance which is nowhere defined in that script. You can omit the variable since it will use the instance it is currently attached to. You also had atleast one pair of {} too many. - script SetCakeWall -1,{ OnInstanceInit: if ( has_instance("EMULATED_MAP_NAME" ) ) setwall "EMULATED_MAP_NAME", 89, 185, 7, 6, false, "cakewall"; end;}
  16. @@rector http://herc.ws/board/topic/10308-configurable-refiner/
  17. @@latheesan I have as much permission as you do. You just need a github account. If you have one you can report bugs here: https://github.com/HerculesWS/Hercules/issues/new And yes it is controlled by msgstringtable.txt since you define the names of the labels of the inventory tabs there, which are they reason to spread the window based on how long the words are.
  18. This won't work since once the user was idle the whole script will get halted also your timer won't be reset once the hour check failed for the first time and if you fixed both you would still have the problem that you get the reward every hour without taking into account the delay induced by the afk time. Also you will lose the connection to your timer on script reload, so you need to re-attach all online players after the reload. @@eKoh Since i am not sure hof that model shall work i recoded the first one i did and added a second version. This one counts the seconds you are not idle and issues the reward every time you reach a non idle time of 1 hour: - script hourlypoints -1,{ end; OnInit: // Config Area // // Set reward id. set .rewardId, 20107; // Set amount of the reward. set .rewardAmt, 10; // Interval in which the script gets updated in seconds. set .updateInterval, 1; // Time you need to be activly online to gain a reward in seconds. set .rewardTime, 3600; // NOCONFIG AREA // set .updateInterval, .updateInterval * 1000; query_sql( "SELECT `account_id` FROM `char` WHERE `online` = 1", .@accountIds ); for( set .@i, 0; .@i < getarraysize( .@accountIds ); set .@i, .@i + 1 ) { if( attachrid( .@accountIds[ .@i ] ) ) doevent strnpcinfo( 3 ) + "::OnReInit"; } end; OnReInit: OnPCLoginEvent: addtimer .updateInterval, strnpcinfo( 3 ) + "::OnCheck"; end; OnCheck: // If player sells or chats. if( checkvending() || checkchatting() ) { // Display message that the event stopped. dispbottom "AriaRO hourly reward event stops as long as you are vending / chatting and your idle time won't be counted torwards your reward."; } else { set @seconds, .updateInterval / 1000; // If the check cooldown ran out. if( @seconds >= .rewardTime ) { // Reset seconds. set @seconds, 0; // Hand out reward and display a message getitem .rewardId, .rewardAmt; dispbottom "You received AriaRO Hourly Ticket by staying ingame for 1 hour"; } } // Reset the timer. addtimer .updateInterval, strnpcinfo( 3 ) + "::OnCheck"; end;} This one resets everytime you go idle so that you have to be 1 hour active nonstop to gain a reward: - script hourlypoints -1,{ end; OnInit: // Config Area // // Set reward id. set .rewardId, 20107; // Set amount of the reward. set .rewardAmt, 10; // Interval in which the script gets updated in seconds. set .updateInterval, 1; // Time you need to be activly online to gain a reward in seconds. set .rewardTime, 3600; // NOCONFIG AREA // set .updateInterval, .updateInterval * 1000; query_sql( "SELECT `account_id` FROM `char` WHERE `online` = 1", .@accountIds ); for( set .@i, 0; .@i < getarraysize( .@accountIds ); set .@i, .@i + 1 ) { if( attachrid( .@accountIds[ .@i ] ) ) doevent strnpcinfo( 3 ) + "::OnReInit"; } end; OnReInit: OnPCLoginEvent: addtimer .updateInterval, strnpcinfo( 3 ) + "::OnCheck"; end; OnCheck: // If player sells or chats. if( checkvending() || checkchatting() ) { // Display message that the event stopped. dispbottom "AriaRO hourly reward event stops as long as you are vending / chatting and your idle time won't be counted torwards your reward."; set @seconds, 0; } else { set @seconds, .updateInterval / 1000; // If the check cooldown ran out. if( @seconds >= .rewardTime ) { // Reset seconds. set @seconds, 0; // Hand out reward and display a message getitem .rewardId, .rewardAmt; dispbottom "You received AriaRO Hourly Ticket by staying ingame for 1 hour"; } } // Reset the timer. addtimer .updateInterval, strnpcinfo( 3 ) + "::OnCheck"; end;}
  19. @@latheesan You have a talent to get errors i have never seen before. If i where in your place, i would file in a bug report about that cash shop thing, it could be an issue with some packets. The inventory size is determined by the words for the section determined in msgstringtable.txt, it seems that it helps to put it in the grf that gets loaded first.
  20. @@eKoh Try this one: - script hourlypoints -1,{ OnReInit: OnPCLoginEvent: addtimer 1000, strnpcinfo( 3 ) + "::OnCheck"; set @checkCoolDown, gettimetick( 2 ) + 60; end; OnCheck: // If player sells or chats. if( checkvending() || checkchatting() ) { // Display message that the event stopped. dispbottom "AriaRO hourly reward event stops as long as you are vending / chatting and your idle time won't be counted torwards your reward."; } else { // If the check cooldown ran out. if( gettimetick( 2 ) >= @checkCoolDown ) { // Add one minute. set @minutes, @minutes + 1; // If the minutes sum to one hour. if( @minutes == 60 ) { // Reset minutes. set @minutes, 0; // Hand out reward and display a message getitem .rewardId, .rewardAmt; dispbottom "You received AriaRO Hourly Ticket by staying ingame for 1 hour"; // Add one hour of online time. set @hours, @hours + 1; } // Set the cooldown of the check to 1 minute. set @checkCoolDown, gettimetick( 2 ) + 60; } } // Reset the timer. addtimer 3000, strnpcinfo( 3 ) + "::OnCheck"; end; OnInit: // Set reward id. set .rewardId, 20107; // Set amount of the reward. set .rewardAmt, 10; query_sql( "SELECT `account_id` FROM `char` WHERE `online` = 1", .@accountIds ); for( set .@i, 0; .@i < getarraysize( .@accountIds ); set .@i, .@i + 1 ) { if( attachrid( .@accountIds[ .@i ] ) ) doevent strnpcinfo( 3 ) + "::OnReInit"; } end;} The one you used had 3 issues: 1. You forgot that you need to clean the NPC-Timers on player logout manually. 2. The npc would stop on script reload. 3. Because of it's design it needed to stop the whole execution once a player was idle and a relog had to be done. This version doesn't have any of those issues, so you should give it a try.
  21. @@latheesan I think it is since you modify the client avast things NEMO Patcher is a virus that illegaly changes your client. You could create an exception to not interfere with the patching process. http://www.getavast.net/support/managing-exceptions
  22. @@latheesan It works with NEMO Patcher. Those patches are pre-enabled: Disable Ahnlab Disable ragexe filename check Read msgstringtable Read datafolder first
  23. @@latheesan You could also try the 2014-10-22 one: https://mega.co.nz/#!kYRAFRqJ!GF4vLIcOKQHsIQkCgZ2oGbXiJaxRsmn1ldohBgOXi3I
  24. @@latheesan Did you get any server side error message? You could also experiment with removing all diff options besides the recommended ones. It might be possible that one of the options doesn't work with your client properly. If you want to go for a newer client the 2014-04-16 seems to be one of the latest stable ones.
  25. @@latheesan You are welcome, it is allways nice to see newcomers and returners here.
×
×
  • Create New...

Important Information

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