Garr
Members-
Content Count
482 -
Joined
-
Last visited
-
Days Won
8
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Garr
-
Disabled skills via map_zone_db.conf are still allowed to be used
Garr replied to Zirius's question in General Server Support
I think the proper way for zone mapflag is just <map_name><%tab>mapflag<%tab>zone<%tab><zone_name> That "pvp" is excess in your call. You can check if your zone is applied on the map by teleporting to it and using @mapinfo, it'll list you all zones it's using. I'd guess this one should either show "PvP" or "PvP + PVP_no_calling". -
[Outdated] battleground system without waitingroom
Garr replied to AnnieRuru's topic in Plugin Releases
If I understood your code right problem should be here: for ( i = 0; bgd->members[i].sd; i++ ) mapreg->setreg( reference_uid( script->add_str("$@arenamembers"), i ), bgd->members[i].sd->bl.id ); As I understood it's supposed to add in members until there'll be no id in next member, the problem is: int bg_team_leave(struct map_session_data *sd, enum bg_team_leave_type flag) {... ARR_FIND(0, MAX_BG_MEMBERS, i, bgd->members[i].sd == sd); if( i < MAX_BG_MEMBERS ) { // Removes member from BG if( sd->bg_queue.arena ) { bg->queue_pc_cleanup(sd); pc->setpos(sd,bgd->members[i].source.map, bgd->members[i].source.x, bgd->members[i].source.y, CLR_OUTSIGHT); } memset(&bgd->members[i], 0, sizeof(bgd->members[0])); }...} The leaving member can have any index in array, including index 0, which will result in $@arenamembersnum staying 0. Oor I may be completely wrong since I never even learned C++ and playing with server code is my first attempt ever >.> -
Indeed, that's truly awesome. And a question, were you able to solve that crash with elven ears? Because seems I stumbled on same thing...
-
Requesting a script for reading "true" skill point
Garr replied to Ink's question in Script Requests
*skillpointcount()Returns the total amount of skill points a character possesses (SkillPoint+SP's used in skills) This command can be used to check the currently attached characters total amount of skill points. This means the skill points used in skill are counted, and added to SkillPoints (number of skill points not used). That should come more handy? -
If you want you can use mine, I use it with white BG, also converted all hercules commands/maps/constants not so long ago. https://www.mediafire.com/?651l534mjmdlec3 (It doesn't let me attach xml files, so >.> ) Example
-
I'd say create race2 for them? Like in Orc Lady card. But that needs a little editing of src. Add your chosen monsters to db/(pre-)re/mob_race2_db.txt. Add script to needed item: bonus2 bAddRace2,<Group number>(RC2_<GROUP NAME>),<Damage Bonus>; Open map.h and find: enum { RC2_NONE = 0,... RC2_MAX} And add your race2 name before RC2_MAX. Also add RC2_<GROUP NAME> <Group number> to db/const.txt I think that should do the trick.
-
Example of an NPC that checks if a player has already learned a skill?
Garr replied to Zirius's question in Script Support
You can find all the script functions in doc/script.commands.txt, variables are names of skills, you can see them in skill_db ( db/(pre-)re/skill_db.txt ). Also, there's quite a few of script-used variables set in db/const.txt. This is not the case, but for the future reference -
Check how many items free space & available weight in inventory
Garr replied to Zirius's question in Script Support
If I understand it right, it's for when you have an array with ItemIDs to give and another array with amounts, like this: setarray .itemIDs[0],512,7049,4001,985; // Apple, Stone, Poring Card, Eluniumsetarray .itemAmount[0],10,20,1,15;if ( checkweight2(.itemIDs,.itemAmount) ) { for ( .@i = 0; .@i < getarraysize(.itemIDs); .@i++) { getitem .itemIDs[.@i],.itemAmount[.@i]; }} else { dispbottom "You don't have enough space in your inventory to get the items!";}end; -
Check how many items free space & available weight in inventory
Garr replied to Zirius's question in Script Support
*checkweight(<item id>,<amount>{,<item id>,<amount>,<item id>,<amount>,...});*checkweight("<item name>",<amount>{,"<item name>",<amount>,"<item name>",<amount>,...});*checkweight2(<id_array>,<amount_array>);These functions will compute and return 1 if the total weight of the specified number of specific items does not exceed the invoking character's carrying capacity, and 0 otherwise. It is important to see if a player can carry the items you expect to give them, failing to do that may open your script up to abuse or create some very unfair errors.The second function will check an array of items and amounts, and alsoreturns 1 on success and 0 on failure.The functions, in addition to checking to see if the player is capable of holding a set amount of items, also ensure the player has room in their inventory for the item(s) they will be receiving.Like 'getitem', this function will also accept an 'english name' from the database as an argument. -
That means you have packet issues. Check that you changed this setting in src/commom/mmo.h: #ifndef PACKETVER #define PACKETVER 20131223#endif // PACKETVER According to the client you're using, and that the client is hexed right.
-
Actually, you can use 3rd party DDNS services (I've been doing that with no-ip), the problem is that 127.0.0.1 in char_ip or login_ip, try to change it into your DDNS name (kornhill.dyndns.org) or comment them out to trigger auto-detecting. What you do with that 127.0.0.1 is sending client off to look for x-server on the PC they are opened with.
-
Actully, above post is not true. In this script a technique called "bitmasking" is used. To set the options right you'd need to change only .Options variable, for example: If you want rewards enabled and sent via mail you'll do this: set .Options, 1|2; If you want rewards enabled, sent via mail, but only to guild leaders: set .Options, 1|2|4; If you want people to get rewards straight into inventory, but people under same IP do not get rewards twice: set .Options, 1|8; So, you see, you combine options you want to happen, connecting them with "|"(bitwise or) statement. setarray .Reward[0],14001,1; Please don't touch the starting index This array tells which rewards you want to hand out. Currently this will hand out 1 Recruit Siege Supply Box (ID14001), you can increase amounts and prizes by changing array like this: setarray .Reward[0],RewardItem1ID,AmountOfItem1,RewardItem2ID,AmountOfItem2, (...), RewardItemNID, AmountOfItemN; For example, if you want to hand out 5 Yggdrassil Berries, 10 White Potions and 1 Poring Card, you'll end up with this: setarray .Reward[0],607,5,504,10,4001,1;
-
All that matters is for such ID to exist, even if it's custom it should work.
-
Greetings to everyone, I'm not really sure where exactly to post this topic, but since I tried some source editing and failed, I decided it belongs in Client support section. What I'd like as result is a colored message inside chatroom. I'm not sure if it's possible, but nonetheless. What I tried is replacing normal message packet (0x8d) with colored message one (0x2c1). Well, for normal chat it makes wonders, but for chatrooms... Text sent with this packet doesn't appear in chatroom itself, but only in chat log of all players within chatroom. So it's not working, I guess. Are there any more ideas I can try out? Maybe someone succeeded in such a deed before?
-
About making combos, there's completely new file, db/(pre-)re/item_combo_db.txt. In your case add there such line: 5137:5377, { skill TF_HIDING,1; } About taking 50% more damage from Wind Property Attack, this should work: bonus2 bSubEle,Ele_Wind,-50; You can find item bonuses list in doc/item_bonus.txt
-
*getmapusers("<map name>")This function will return the number of users currently located on the specified map.Currently being used in the PVP scripts to check if a PVP room is full of not, if the number returned it equal to the maximum allowed it will not let you enter.---------------------------------------*getareausers("<map name>",<x1>,<y1>,<x2>,<y2>)This function will return the count of connected characters which are located within the specified area - an x1/y1-x2/y2 square - on the specified map.This is useful for maps that are split into many buildings, such as all the "*_in" maps, due to all the shops and houses.
-
In clif.c find following code: if( dstsd->state.autotrade == 1 ) { char output[256]; sprintf(output, "%s is in autotrade mode and cannot receive whispered messages.", dstsd->status.name); clif->wis_message(fd, map->wisp_server_name, output, strlen(output) + 1); return; } Under sprintf is message to outcome, if you want to remove it completely just comment sprintf and clif lines.
-
Open Makefile.in in src/plugins/ and edit line MYPLUGINS = Write there name of plugin, in your case afk. If you'll have more just add them after space. You'll have this: MYPLUGINS = afk Now do ./configure && make all from Herc directory or, if you have server compiled already, do make plugins. Also, after that open conf/plugins.conf and add your plugin there. Since it's a command don't forget to add it to conf/groups.conf. If you want you can add aliases for this command in conf/atcommand.conf.
-
Change OnInit part of code: OnInit:setarray .Message$,"Welcome to RetRO", "Strictly ENGLISH when using the Broadcaster.", "Message 2", "Message 3", "Message 4"; initnpctimer;npcspeed 350;while( 1 ) { npctalk .Message$[ rand( getarraysize( .Message$ ) ) ]; sleep 60*1000;}end; While will be endless cycle, so it should go last under OnInit label. Also, your closing right curly bracket got lost somewhere in the end, so instead of endless repeat like you wanted it ended after first talk on end; under npcspeed 350; Also, remove one right curly bracket in the end of script.
-
About player not attached, I gave you info on doevent and donpcevent, donpcevent DOES NOT TRANSFER RID, while doevent DOES. About why you're getting NPC not found error is because the label you want to trigger is inside function. Functions are treated differently from NPC, and as far as I know you shouln't be able to trigger labels in them with do(npc)event. What might work, however, is summoning label without NPC name, like this: doevent "::OnTrigger"; I'll test that and tell you result. EDIT: Even that doesn't work. Only way you can trigger label in function is by goto inside function itself. Otherwise you can only call said function from the beginning with callfunc. As an alternative you can create another function with what's supposed to be under that label code, or add in an argument to function which will decide which label to trigger, and switch(getarg(0)), for example, at the start of function.
-
It'a kind of hard to tell why without seeing the script itself. Common problem is that you either misspelled NPC name or gave NPC a unique name, yet still try to call it via normal name. Example: function script TestCall {donpcevent "Tes::OnTrigger"; // <- Will errordonpcevent "Testing#01::OnTrigger"; // <- Will errordonpcevent "Test::OnTrigger"; // <- Should succeedreturn;}prontera,185,147,4 script Testing#01::Test 837,{mes "Hello!";callfunc "TestCall";close;OnTrigger:emotion e_sob;return;} ETA: It doesn't work as in not found like this? Or it doesn't work in some other way? (because depending on how you call label it will either have RID attached or not, and OnSellItem should have RID attached.) *doevent "<NPC object name>::<event label>";This command will start a new execution thread in a specified NPC object at the specified label. The execution of the script running this command will not stop, and the event called by the 'doevent' command will not run until the invoking script has terminated. No parameters may be passed with a doevent call.The script of the NPC object invoked in this manner will run as if it's been invoked by the RID that was active in the script that issued a 'doevent'. As such, the command will not work if an RID is not attached.---------------------------------------*donpcevent "<NPC object name>::<event label>";This command invokes the event label code within an another NPC or NPCs. It starts a separate instance of execution, and the invoking NPC will resume execution its immediately.If the supplied event label has the form "NpcName::OnLabel", then only given NPC's event label will be invoked (much like 'goto' into another NPC). If the form is "::OnLabel" (NPC name omitted), the event code of all NPCs with given label will be invoked, one after another. In both cases the invoked script will run without an attached RID, whether or not the invoking script was attached to a player. The event label name is required to start with "On".This command can be used to make other NPCs act, as if they were responding to the invoking NPC's actions, such as using an emotion or talking.
-
Monster HP, From red bar to numbers. (Client?)
Garr replied to deviruzy's question in General Server Support
If all of them don't work, then maybe (just maybe), you're using showname format #1 in client? It looks like this on monster: On the other hand, that conf only works with showname style 2, it should look like this: So if you're having bold font on character and monster names type /showname, and it should change to thin font where additional info is shown. -
Well, yours will only work for 3 items, this one should go for any amount: - shop dyn_shop1 -1,501:50- script Test -1,{ callshop "dyn_shop1",2; npcshopattach "dyn_shop1"; end;OnSellItem: for (.@i = 0; .@i < getarraysize(@sold_nameid); .@i++) { if (countitem(@sold_nameid[.@i]) < @sold_quantity[.@i] || @sold_quantity[.@i] <= 0) { mes "omgh4x!"; close; } else if (@sold_nameid[.@i] > 1){ setd ".@item" + .@i, @sold_nameid[.@i]; setd ".@itemqty" + .@i, @sold_quantity[.@i]; mes "You want " + getd(".@itemqty" + .@i) + " " + getitemname(getd(".@item" + .@i)) + (getd(".@itemqty" + .@i)>1?"s":"") + ", right?"; } } mes "That totals " + getarraysize(@sold_nameid) + " items."; deletearray @sold_quantity, getarraysize(@sold_quantity); deletearray @sold_nameid, getarraysize(@sold_nameid); close;}prontera,154,182,5 duplicate(Test) Test#1 117 An it's strange, for me arrays with char variables went fine.
-
But you already have IDs and amount sold in variables O_o @sold_nameid[index] <- array with ID of item; @sold_quantity[index] <- array with sold amounts. If you want to keep these variables in char-based ones following should work: - shop dyn_shop1 -1,501:50- script Test -1,{callshop "dyn_shop1",2;npcshopattach "dyn_shop1";end; OnSellItem: for (.@i = 0; .@i < getarraysize(@sold_nameid); .@i++) { if (countitem(@sold_nameid[.@i]) < @sold_quantity[.@i] || @sold_quantity[.@i] <= 0) { mes "omgh4x!"; close; } item[getarraysize(item)] = @sold_nameid[.@i]; amount[getarraysize(amount)] = @sold_quantity[.@i]; } deletearray @sold_quantity, getarraysize(@sold_quantity); deletearray @sold_nameid, getarraysize(@sold_nameid); mes "Stored item sellings:"; for (.@i = 0; .@i < getarraysize(item); .@i++) { mes "ItemID: " + item[.@i] + "; Amount: " + amount[.@i]; } mes "These will not disappear anywhere until you clean up these arrays yourself."; close;}prontera,154,182,5 duplicate(Test) Test#1 117
-
/doc/atcommand.txt @memo {<0-2>}Saves a warp point for the "Warp Portal" skill.If a number is not specified, the command will output all currently saved locations.Location "void" indicates an empty warp point. Maybe just give players access to this command?