Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Everything posted by AnnieRuru

  1. hmmm ~ nice ~ learn some thing newnow tell the whole world to remove that warning like your did ... not gonna happen actually the problem is not on msvc ... can remind them to ignore it its 'Debian GNU/Linux 6.0.5' that Hadeszeus using that was giving me headache if you have a method that it doesn't throw error for Hadeszeus, I'm willingly to know too but I'll probably stick to calculate the string . make sense actuallywhile nobody in hercules forum willingly to convert this patch into rathena format but its logical to ask someone over rathena forum to convert hercules patch into rathena after all, we already have so many stuffs there was taken from rathena forum anyway . . I just noticed a minor bug that while you can't create a clone having a chat room open but still can open a chat room after having a market clone I should fix this or not ? logical thinking, people are creating this clone and left it in town, so the player would be off questing in other maps so I think should allow them so a clone is in town, while allow them to open a chat room inside a dungeon or something
  2. AnnieRuru

    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
  3. 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
  4. just add this line should work ... tested #include "../common/HPMDataCheck.h" // should always be the last file included! (if you don't make it last, it'll intentionally break compile time)
  5. omfg ... forgot to add pc-> symbol EDIT- modify existing paste is very useful ...
  6. AnnieRuru

    NPC Buy/Sell

    http://rathena.org/board/topic/92497-chatroom-that-retrives-all-the-id-on-it/?hl=hercules#entry244793 btw for this part + if ( cd->owner->type == BL_PC ) {+ struct npc_data* nd = npc->name2id("OnPCJoinChatEvent");+ mapreg->setreg( script->add_str("$@waitingroomowner"), ((TBL_PC*)cd->owner)->status.account_id );+ script->run( nd->u.scr.script, 0, sd->bl.id, nd->bl.id );+ }it should be if ( cd->owner->type == BL_PC ) { struct npc_data *nd = npc->name2id("OnPCJoinChatEvent"); if ( !nd ) { ShowError( "OnPCJoinChatEvent not found !" ); return false; } mapreg->setreg( script->add_str("$@waitingroomowner"), ((TBL_PC*)cd->owner)->status.account_id ); script->run( nd->u.scr.script, 0, sd->bl.id, nd->bl.id ); }otherwise the server just simply crash without giving any sort of error if OnPCJoinChatEvent not exist
  7. 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
  8. AnnieRuru

    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
  9. try this on your SQL select now(); select from_unixtime ( unix_timestamp( now() ) ); both should return your server time if its different, sorry I dunno how to fix it
  10. https://github.com/HerculesWS/Hercules/pull/364 pull request then, if got rejected ... so oh well
  11. AnnieRuru

    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
  12. can't reproduceyou should type @time to get real server actual time, not by your house clock from what I see, your server clock has -12 time zone different
  13. almost correctactually I wanna write this but me has more things to write haha 1. your script lack OnPCLogoutEvent what happen if the player bet an item, then suddenly got dc script will hang I think 2. your script lacks building an sql table what happen if the player bet an item, then server shut down ? hahaha should store everything in a SQL table, in case player say got scam ? storing in a SQL served 2 purposes, 1st for logging, 2nd for give back the item when server restart OnInit: ... give back all the item from sql
  14. can I ask ... why not just use guild instance system ? hercules emulator can do it
  15. AnnieRuru

    claw game

    can I exercise my right to warn this user ?. .
  16. thx Angelmelody up to version 1.2 @tlacson7 the plugin works but you have to patch this atm, I didn't properly code the removeFromMOBDB, removeFromMOBDATA, removeFromITEMDATA stuff (I never use them =/) so don't use these 3 commands yet
  17. 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;}
  18. AnnieRuru

    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) );
  19. AnnieRuru

    NPC Buy/Sell

    if you look at BUILDIN(getitem)pc->additem(sd, &it, get_count, LOG_TYPE_SCRIPT)everything is manipulate in &itwhere it comes from struct item it;and struct item comes from mmo.hstruct item { int id; short nameid; short amount; unsigned int equip; // Location(s) where item is equipped (using enum equip_pos for bitmasking). char identify; char refine; char attribute; short card[MAX_SLOTS]; unsigned int expire_time; char favorite; unsigned char bound; uint64 unique_id;};so you always manipulate the data withit.identify = 1; it.card[0] = 4001; and so on http://www.tutorialspoint.com/cprogramming/c_structures.htm . . http://herc.ws/board/topic/7040-item-item-deny/?p=42843need 3 commands Sql->Query Sql->NextRow Sql->GetData
  20. fixed in 1.1download again @GmOcean yes, read the mob_clone_spawn_market function have you forgotten about mob controller system ?
  21. I don't understand thisplugin should be able to overwrite the original atcommand . . Michieru recently revert back the SZ_SMALL and SZ_MEDIUM constanthttps://github.com/HerculesWS/Hercules/commit/8ab61745b81d1cf0602c7998f590aac8749187da so change the SZ_SMALL into SZ_MEDIUM I also don't really understand why though . . it should spawn on character's coordinate ...where do your server spawn the clone then ? EDIT: Fixed your error on 1.0a
  22. 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
  23. so here's mine http://upaste.me/927531 plugin coming soon report any bugs you can find ... now go out for dinner and ... I don't think anybody here willingly to convert into rathena ...
  24. pull request https://github.com/HerculesWS/Hercules/pull/362 tested with http://upaste.me/75e9a3 just noticed mob_db and mob_data are actually different so just add them both mob_db is similar to item_data, where it points to the `item_db` or `mob_db` database mob_db uses mob_id range 1001~4000 mob_data is the GID of the monster, so this one is made for individual monster manipulation mob_data create GID of the monster start from 100000000
  25. AnnieRuru

    NPC Buy/Sell

    noif you using clif_selllist function then the packet header is 0xc7 this will open the sell item window WFIFOW(fd,4+c*10)=i+2; this one tells the client to list out the item from your inventory of position i dunno what's +2 means though try play around with it
×
×
  • Create New...

Important Information

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