Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Reputation Activity

  1. Upvote
    AnnieRuru got a reaction from GmOcean in NPC Buy/Sell   
    athena script engine has always initialized every variable as 0but in C, if you declare a variable and did not initialized it, it will gives you some random number like 25774833
    .
    int number; // declare a variableprintf( "%d", number ); // some random numberint number = 0; // declare and initialize a variableprintf( "%d", number ); // return 0int number; // declare a variablenumber = 0; // set the valueprintf( "%d", number ); // return 0.nowadays the C compiler should throw you an error on 1st example ...
    me ( and probably you ) still using outdated microsoft visual C++ 2010 it doesn't throw error though
     
    your client crashed because it has some random high number,
    you should reset all values as 0 if you don't want to set every variable in that structure
    memset( &it, 0, sizeof(it) );
  2. Upvote
    AnnieRuru got a reaction from GmOcean in NPC Buy/Sell   
    I found it hard to believe 'on duplicate key update' doesn't work
     

    create table test ( char_id int(11) primary key, name varchar(23) ) engine = innodb; insert into test select char_id, name from `char`; .
    ACMD(test) { if ( SQL->Query( map->mysql_handle, "insert into test values (150000,'AnnieRuru0') on duplicate key update name = 'AnnieRuru0'" ) == SQL_SUCCESS ) clif->message( fd, "success" ); else clif->message( fd, "failed" ); return true;} ACMD_DEF(test),..
    your `buyback` table, drop the `id` field, then set `char_id` as primary,
    then maybe set a delay like 2 seconds before the user can use another shop
  3. Upvote
    AnnieRuru got a reaction from GmOcean in NPC Buy/Sell   
    oh ? I thought you want to run external npc script
    many members here has athena script language as their primary scripting language
    so its not an optimized method, but most scripters love to do it
    maybe I just misunderstood your question
    like I said, the patch should looks like getinventorylist, and then loop them 1 by 1 
    how about you try to make an npc script as follow
    getitem2 1201, 1,1,0,0, 4001,0,0,0;getitem2 1201, 1,1,0,0, 4002,0,0,0;getitem2 1201, 1,1,0,0, 4003,0,0,0;setarray .@card1, 4001, 4002, 4003;for ( .@j = 0; .@j < 3; .@j++ )for ( .@i = 0; .@i < @inventorylist_count; .@i++ )if ( @inventorylist_id == 1201 && @inventorylist_card1 == .@card1[.@j] )...it should has a 2-dimensional loopI don't really like the method of just listing last 10 items
    I remember the item will auto-sort ... dunno on which condition ... couldn't find it, but certainly when player login
    but I don't want take chances of using last 10 index
    .
    the n value has declared from the beginning of the functionint npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list) {int n is some sort like getarg(1)so try to find which function is actually calling npc->sellist, only 1 result which is clif_parse_NpcSellListSend
    inside there has
    n = (RFIFOW(fd,2)-4) /4;another packet stuffs I seriously hateyou know just now I just used 2 hours just to figure out how to write clif_charnameack_pre from @market_clone plugin
    this one is quite understandable ... n should be total number of inventory item ?
    or maybe means MAX_INVENTORY ?
    dunno ... try debug the n value ...
     
    I might probably want to spoon feed already, drag on for too long
    ... provided I have the time
  4. Upvote
    AnnieRuru got a reaction from vBrenth in @market clone   
    http://herc.ws/board/topic/7127-maintenance-mode/?p=43750
    ask Hadeszeus is his sscanf is really working fine or not
    because that also works fine in my test server
     
    I know I'm being sarcastic, and love to do string calculation hahaha
    or actually I just simply hate people posting error ... error ... on my topic, kinda spoiled my reputation
     
    in msvc2010, sscanf will throw error, saying need to use s_sscanf
    then if you use s_sscanf, then other members who are not using mscv will get an error ...
    very annoying
    but when calculate the string, everybody happy
  5. Upvote
    AnnieRuru reacted to Angelmelody in @market clone   
    all those s_xxxx.. annoying warnings in my plugin projects were disabled  by me , coz I hate those
     
     
     
  6. Upvote
    AnnieRuru got a reaction from karazu in @market clone   
    I just noticed somebody in rathena actually start converting my patch into rathena ... namely Napster
    well kinda a competition then, as rathena does have more user base than hercules
     
    version 1.3 released
    plugin or patch
    -- change back all status-damage into status-kill for readability
    -- fix a bug that when a server enabled show_mob_info, the clone shouldn't has listed the hp nor level (credit: Napster)
    -- fix a bug that player shouldn't create a market clone while chatting or vending
    -- and for the patch, move all configuration into battle folder, makes more sense in this way (credit: Napster)
    -- add zeny requirement
  7. Upvote
    AnnieRuru got a reaction from evilpuncker in claw game   
    the problem is, once you post anything on the board, you can't edit it
    I was away yesterday so I wasn't around to see this topic
     
    might be off-topic, but I don't really like that 'preserve uniqueness' part
    a lot people who make only private scripts often has hidden bugs (I often review paid scripts through PMs)
    only by releasing publicly, then you can learn more about hidden bugs and different kind of techniques
     
     
    EDIT
    how about you edit back your post, then I can write one for you ... for free
    then you can compare the script that often wrote in public, and another one often wrote in private
     
     
     
  8. Upvote
    AnnieRuru got a reaction from Zirius in Which should I use "break" / "continue" ? Snapping out of while and check var again   
    while isn't needed
    prontera,155,180,4 script This eynt working#2 1_ETC_01,{ da_var++; if ( da_var < 4 ) mes "you hit "+da_var; else mes "you hit rock bottom"; close;}
  9. Upvote
    AnnieRuru reacted to kyeme in @market clone   
    @AnnieRuru,
    I have a suggestion, can you disable @market while vending, based on my knowledge in official you cannot create chatroom while vending.
    Thank you.
  10. Upvote
    AnnieRuru got a reaction from nomade in @market clone   
    Download: 1.9
    plugin
     
    Create a market clone, to leave a message for other players
    while the player can go hunting/questing/events
    @market "<Title>" "<Message>" <Color> create a market clone with a chat room titled -> "<Title>"
    when players tries to join the chat room, it refuse the joining, but instead leave a message -> "<Message>"
    with 1.4 update,
    player can now choose their own favorite color for their AFK message
    the <Color> field is optional
    I was struggling to use array for the color list ...
    but in the end, I guess the simplicity is the best
    so you guys can guess how to add in your own list easily
     
    @marketkill kill the market clone without logging off
     
    when a GM do @killmonster @killmonster2, or *killmonster *kilmonsterall script command will not remove the clone
    but @reloadscript, however, will remove it
     
    feels like I just copy paste from the description
    whatever ...
     
    Credit : remember to rep Dastgir's topic because I mostly copy his codes
     
     
  11. Upvote
    AnnieRuru reacted to GmOcean in Guild Package   
    If they are giving you 000000000000000 mac address, then chances are they are running the client program through a sand box. Doing so will create a virtual machine that cannot be detected by 90% of client programs that try to prevent dual clienting.
     
    In fact, I've personally used sandboxing to dual client on servers that don't support it, using the client they give. But, this is a rare situation as most players of RO wouldn't think of it unless they've heard of it before.
  12. Upvote
    AnnieRuru reacted to Angelmelody in @market clone   
    I try building a hooking function to prevent the market clone killed by @killmonster CMDint atkillmonster_sub_pre(struct block_list *bl, va_list *ap){ struct mob_data *md; struct monster_data *mmd; md = (struct mob_data *)bl; if ( ( mmd = getFromMOBDATA( md, 0 ) ) ) { if(mmd->market_chat_id){ hookStop(); return 0; } } return 1;}addHookPre( "atcommand->atkillmonster_sub", atkillmonster_sub_pre );
  13. Upvote
    AnnieRuru got a reaction from sever in @market clone   
    Download: 1.9
    plugin
     
    Create a market clone, to leave a message for other players
    while the player can go hunting/questing/events
    @market "<Title>" "<Message>" <Color> create a market clone with a chat room titled -> "<Title>"
    when players tries to join the chat room, it refuse the joining, but instead leave a message -> "<Message>"
    with 1.4 update,
    player can now choose their own favorite color for their AFK message
    the <Color> field is optional
    I was struggling to use array for the color list ...
    but in the end, I guess the simplicity is the best
    so you guys can guess how to add in your own list easily
     
    @marketkill kill the market clone without logging off
     
    when a GM do @killmonster @killmonster2, or *killmonster *kilmonsterall script command will not remove the clone
    but @reloadscript, however, will remove it
     
    feels like I just copy paste from the description
    whatever ...
     
    Credit : remember to rep Dastgir's topic because I mostly copy his codes
     
     
  14. Upvote
    AnnieRuru got a reaction from kyeme in @market clone   
    Download: 1.9
    plugin
     
    Create a market clone, to leave a message for other players
    while the player can go hunting/questing/events
    @market "<Title>" "<Message>" <Color> create a market clone with a chat room titled -> "<Title>"
    when players tries to join the chat room, it refuse the joining, but instead leave a message -> "<Message>"
    with 1.4 update,
    player can now choose their own favorite color for their AFK message
    the <Color> field is optional
    I was struggling to use array for the color list ...
    but in the end, I guess the simplicity is the best
    so you guys can guess how to add in your own list easily
     
    @marketkill kill the market clone without logging off
     
    when a GM do @killmonster @killmonster2, or *killmonster *kilmonsterall script command will not remove the clone
    but @reloadscript, however, will remove it
     
    feels like I just copy paste from the description
    whatever ...
     
    Credit : remember to rep Dastgir's topic because I mostly copy his codes
     
     
  15. Upvote
    AnnieRuru got a reaction from Only4fun in @market clone   
    Download: 1.9
    plugin
     
    Create a market clone, to leave a message for other players
    while the player can go hunting/questing/events
    @market "<Title>" "<Message>" <Color> create a market clone with a chat room titled -> "<Title>"
    when players tries to join the chat room, it refuse the joining, but instead leave a message -> "<Message>"
    with 1.4 update,
    player can now choose their own favorite color for their AFK message
    the <Color> field is optional
    I was struggling to use array for the color list ...
    but in the end, I guess the simplicity is the best
    so you guys can guess how to add in your own list easily
     
    @marketkill kill the market clone without logging off
     
    when a GM do @killmonster @killmonster2, or *killmonster *kilmonsterall script command will not remove the clone
    but @reloadscript, however, will remove it
     
    feels like I just copy paste from the description
    whatever ...
     
    Credit : remember to rep Dastgir's topic because I mostly copy his codes
     
     
  16. Upvote
    AnnieRuru reacted to vBrenth in @market clone   
    What im saying is the character position, for example you face is on the north is south the clone should copy it too and also if its your sitting while using @market
    the clone will copy ur character sitting too but the problem is you have to refresh/rewarp to see it sitting. (dastgir market)
     
     
    Its just throw me that error
     
     
    Its fine its cute, just the character direction ehe. and compile warning o.O
  17. Upvote
    AnnieRuru got a reaction from Hadeszeus in @market clone   
    Download: 1.9
    plugin
     
    Create a market clone, to leave a message for other players
    while the player can go hunting/questing/events
    @market "<Title>" "<Message>" <Color> create a market clone with a chat room titled -> "<Title>"
    when players tries to join the chat room, it refuse the joining, but instead leave a message -> "<Message>"
    with 1.4 update,
    player can now choose their own favorite color for their AFK message
    the <Color> field is optional
    I was struggling to use array for the color list ...
    but in the end, I guess the simplicity is the best
    so you guys can guess how to add in your own list easily
     
    @marketkill kill the market clone without logging off
     
    when a GM do @killmonster @killmonster2, or *killmonster *kilmonsterall script command will not remove the clone
    but @reloadscript, however, will remove it
     
    feels like I just copy paste from the description
    whatever ...
     
    Credit : remember to rep Dastgir's topic because I mostly copy his codes
     
     
  18. Upvote
    AnnieRuru got a reaction from Napster in @market clone   
    Download: 1.9
    plugin
     
    Create a market clone, to leave a message for other players
    while the player can go hunting/questing/events
    @market "<Title>" "<Message>" <Color> create a market clone with a chat room titled -> "<Title>"
    when players tries to join the chat room, it refuse the joining, but instead leave a message -> "<Message>"
    with 1.4 update,
    player can now choose their own favorite color for their AFK message
    the <Color> field is optional
    I was struggling to use array for the color list ...
    but in the end, I guess the simplicity is the best
    so you guys can guess how to add in your own list easily
     
    @marketkill kill the market clone without logging off
     
    when a GM do @killmonster @killmonster2, or *killmonster *kilmonsterall script command will not remove the clone
    but @reloadscript, however, will remove it
     
    feels like I just copy paste from the description
    whatever ...
     
    Credit : remember to rep Dastgir's topic because I mostly copy his codes
     
     
  19. Upvote
    AnnieRuru got a reaction from GmOcean in @market clone   
    Download: 1.9
    plugin
     
    Create a market clone, to leave a message for other players
    while the player can go hunting/questing/events
    @market "<Title>" "<Message>" <Color> create a market clone with a chat room titled -> "<Title>"
    when players tries to join the chat room, it refuse the joining, but instead leave a message -> "<Message>"
    with 1.4 update,
    player can now choose their own favorite color for their AFK message
    the <Color> field is optional
    I was struggling to use array for the color list ...
    but in the end, I guess the simplicity is the best
    so you guys can guess how to add in your own list easily
     
    @marketkill kill the market clone without logging off
     
    when a GM do @killmonster @killmonster2, or *killmonster *kilmonsterall script command will not remove the clone
    but @reloadscript, however, will remove it
     
    feels like I just copy paste from the description
    whatever ...
     
    Credit : remember to rep Dastgir's topic because I mostly copy his codes
     
     
  20. Upvote
    AnnieRuru got a reaction from Judas in @market clone   
    Download: 1.9
    plugin
     
    Create a market clone, to leave a message for other players
    while the player can go hunting/questing/events
    @market "<Title>" "<Message>" <Color> create a market clone with a chat room titled -> "<Title>"
    when players tries to join the chat room, it refuse the joining, but instead leave a message -> "<Message>"
    with 1.4 update,
    player can now choose their own favorite color for their AFK message
    the <Color> field is optional
    I was struggling to use array for the color list ...
    but in the end, I guess the simplicity is the best
    so you guys can guess how to add in your own list easily
     
    @marketkill kill the market clone without logging off
     
    when a GM do @killmonster @killmonster2, or *killmonster *kilmonsterall script command will not remove the clone
    but @reloadscript, however, will remove it
     
    feels like I just copy paste from the description
    whatever ...
     
    Credit : remember to rep Dastgir's topic because I mostly copy his codes
     
     
  21. Upvote
    AnnieRuru got a reaction from THPO in @market clone   
    Download: 1.9
    plugin
     
    Create a market clone, to leave a message for other players
    while the player can go hunting/questing/events
    @market "<Title>" "<Message>" <Color> create a market clone with a chat room titled -> "<Title>"
    when players tries to join the chat room, it refuse the joining, but instead leave a message -> "<Message>"
    with 1.4 update,
    player can now choose their own favorite color for their AFK message
    the <Color> field is optional
    I was struggling to use array for the color list ...
    but in the end, I guess the simplicity is the best
    so you guys can guess how to add in your own list easily
     
    @marketkill kill the market clone without logging off
     
    when a GM do @killmonster @killmonster2, or *killmonster *kilmonsterall script command will not remove the clone
    but @reloadscript, however, will remove it
     
    feels like I just copy paste from the description
    whatever ...
     
    Credit : remember to rep Dastgir's topic because I mostly copy his codes
     
     
  22. Upvote
    AnnieRuru got a reaction from Break San in map change   
    disable player from multi client and kick AFK players ?
    that's a frequently asked question until .... I'm sick of it
     
    I know how to block same ip address, but dunno how to block same mac address
    and for the AFK script
    //===== Hercules Script ===========================================//= AFK script//===== By: =======================================================//= AnnieRuru//===== Current Version: ==========================================//= 1.3//===== Compatible With: ==========================================//= Hercules 20140919//===== Description: ==============================================//= warp AFK players in BG maps to SavePoint, leave current team//===== Topic =====================================================//= http://www.eathena.ws/board/index.php?showtopic=272411//===== Additional Comments: ======================================//= repost this script for hercules//=================================================================- script afk_script -1,{// ConfigOnInit: .sleeploop = 2000; // every 1 second .afk = 4; // loop 180 times of 1 second = 3 minutes to execute setarray .@map$, "bat_a01", "bat_a02", "bat_b01", "bat_b02", "bat_c01", "bat_c02", "bat_c03"; // battlegrounds .@size = getarraysize( .@map$ ); for ( .@i = 0; .@i < .@size; .@i++ ) setmapflag .@map$[.@i], mf_loadevent; .map$ = ":"+ implode( .@map$, ":" ) +":"; .idle = .sleeploop * .afk / 1000; end;// what to do when triggeredL_trigger:// dispbottom "you have afk for "+ .idle +" seconds"; if ( getcharid(4) ) bg_leave; warp "SavePoint", 0,0; end;// functionOnPCLoadMapEvent: while ( true ) { if ( compare( .map$, ":"+ strcharinfo(3) +":" ) ) { if ( checkidle() >= .idle ) goto L_trigger;// dispbottom "you have afk for "+ checkidle() +" seconds"; sleep2 .sleeploop; } else break; } end;}wanted to make a release topic, but suddenly realize Ind almost finish the battleground queue systemmight as well use his ... when ready
  23. Upvote
    AnnieRuru got a reaction from Break San in map change   
    from topic
     
    http://upaste.me/30b95b
  24. Upvote
    AnnieRuru reacted to GmOcean in Sample Questlog & Achievement script   
    @showevent and questinfo not working - Are you using an outdated client? It should be fixed in client version 2013-08-07 onwards. Atleast some report that it's fixed.
    If it's an issue regarding a different matter, perhaps it's similar to this: http://rathena.org/board/tracker/issue-8156-showevent-statecolor/
  25. Upvote
    AnnieRuru got a reaction from Jedzkie in Quest Modification   
    http://upaste.me/7f63cf
     
    pull request then, not me
×
×
  • Create New...

Important Information

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