Jump to content

Euphy

Members
  • Posts

    2997
  • Joined

  • Last visited

  • Days Won

    73

Everything posted by Euphy

  1. Oh, if you're only using a single map then mapreg will suffice. (We like to avoid mapreg when using lots of variables because all permanent global variables auto-save in regular intervals.) You're using the variable correctly - just note that gettimetick(2) is in seconds, not days, and that you shouldn't be storing it as a string. A sample: if (gettimetick(2) < $rentexpire) { mes (($renter_guild)?getguildname($renter_guild):"No guild")+" currently owns the map."; if ($renter_guild && getcharid(2) == $renter_guild) { mes "Would you like to warp there?"; next; if(select("Yes!:No.") == 1) warp "map",x,y; close; } close; } else { mes "Ownership by the "+getguildname($renter_guild)+" has expired."; if (!getcharid(2)) { mes "You must be part of a guild to rent this map."; close; } mes "Do you want to rent this map?"; next; if(select("Yes!:No") == 2) { mes "See you later."; close; } //your requirements if (gettimetick(2) < $rentexpire) { mes "Sorry, but another guild has rented this map."; close; } set $renter_guild, getcharid(2); set $rentexpire, gettimetick(2) + 2678400; mes "Map rented successfully to the "+getguildname($renter_guild)+" guild for 31 days."; mes "Enjoy!"; close; }
  2. You did a very nice job with this. One of the best banker scripts I've seen.
  3. I would suggest using a separate database; they're not that difficult to create, consume less resources, and are guaranteed to be persistent to server shutdowns. Concept: Create a database with columns for guild, time, and (if applicable) map name. Have an NPC (or function) query the database to check if the user's guild is the owner prior to warping. I'd include code to delete expired entries here, as well. If there is no owner, ask if the player wants to rent; if yes, and all conditions are met (cost, re-check ownership, etc.), insert an entry into the database (guild, current time + 1 month, map). (optional) Use an OnPCLoadMapEvent trigger to remove unwanted players from the map. 'gettimetick(2)' retrieves the system time in UNIX epoch time (in seconds). Not really applicable for this unless you want to use UNIX time instead of a DATETIME data type.
  4. Euphy

    Renewal ATK

    We're in the final stages of testing right now -- the mechanics are nearly finished, but we still have to make sure that our changes don't affect Pre-Renewal servers.
  5. Yeah, you can't do this easily with my script. I decided not to store the main menu.
  6. Only 'npcskill', which you could create an OnTouch label for:
  7. if (getequipcardcnt(EQI_HEAD_TOP)) { successremovecards EQI_HEAD_TOP; dispbottom "Cards are not allowed on this item."; }
  8. @critica: The purpose of the commands is to make a temporary change, not a permanent one. There are already multiple methods of editing the permanent databases.
  9. - script #chan_autojoin -1,{ OnPCLoginEvent: atcommand "@join #main"; end; }
  10. If we do create branches, we'd have three: Mixed RE/pre-RE, as it is now. RE only. Pre-RE only. The main branch would be the first, so you wouldn't notice anything different. (Again, this is a big "if" - we're always short of developers.)
  11. This is now an issue because the Hall of Abyss update (Renewal-specific) removes the 'gvg_dungeon' mapflags from gld_dun[01-04] and places them on the Hall of Abyss maps (gld2_[ald/gef/pay/prt]). Since splitting the directory requires some sort of restructuring, we may as well get other things done too: Move conf/mapflag/ to npc/mapflag/ and npc/(pre-)re/mapflag/. Store all Pre-Renewal maps in the root directory (npc/mapflag/), except the guild dungeons (as they're the only ones that have changed from Pre-Renewal to Renewal). Create new mapflag files for all Renewal maps, so that servers in Pre-Renewal don't have to load mapflags for maps they don't use. Drop all empty mapflag files, since we now have all mapflags documented in trunk/doc/mapflags.txt as of r17335: trunk/conf/mapflag/noexp.txt trunk/conf/mapflag/noloot.txt trunk/conf/mapflag/novending.txt Any opinions?
  12. I finished writing the official Mora scripts in r17344. trunk/npc/re/cities/mora.txt trunk/npc/re/guides/guides_mora.txt trunk/npc/re/instances/HazyForest.txt trunk/npc/re/merchants/enchan_mora.txt trunk/npc/re/merchants/quivers.txt trunk/npc/re/mobs/fields/bifrost.txt trunk/npc/re/quests/quests_mora.txt trunk/npc/re/warps/fields/bif_fild.txt
  13. We do plan to move our main repo to GIT in the near future; it'll be much more plausible when that happens. But the main problem is finding developers to maintain a separate branch, as we're nearly all concentrating on Renewal.
  14. You most likely aren't updated. //===== Compatible With: ===================================== //= rAthena SVN r16114+
  15. Reference: trunk/npc/custom/card_remover.txt
  16. That was actually for my controller (if you look at the variable type). // Rewards per castle. // -- when given directly: <itemID>,<amount>{,<itemID>,<amount>,...} // -- via mail (option 2): <itemID>,<amount>,<Zeny> setarray .Reward[0],14001,1;
  17. trunk/src/map/pc.c if(battle_config.bone_drop==2 || (battle_config.bone_drop==1 && map[sd->bl.m].flag.pvp)) { struct item item_tmp; memset(&item_tmp,0,sizeof(item_tmp)); item_tmp.nameid=ITEMID_SKULL_; item_tmp.identify=1; item_tmp.card[0]=CARD0_CREATE; item_tmp.card[1]=0; item_tmp.card[2]=GetWord(sd->status.char_id,0); // CharId item_tmp.card[3]=GetWord(sd->status.char_id,1); map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0); } Change 'nameid' (item ID) and set the card slots to 0.
  18. Added Thai translation in r17342, and updated IDN.
  19. I already added the official script and database entries for the Refine Ticket NPC in r17338. You don't really need the custom items, at least.
  20. Euphy

    Delete Item

    I'd recommend displaying the item IDs as well as names in the window, and using 'input' instead of 'menu' since you'd likely get huge menus that are hard to find things in. xP mes "Your inventory:"; getinventorylist; for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1) mes "[ "+@inventorylist_id[.@i]+" ] "+getitemname(@inventorylist_id[.@i])+" x"+@inventorylist_amount[.@i]; next; input .@item; if (getitemname(.@item) != "null") { if (countitem(.@item)) { input .@amount; if (.@amount && countitem(.@item) >= .@amount) { delitem .@item,.@amount; mes getitemname(.@item)+" x"+.@amount+" deleted."; close; } else { mes "Invalid amount "+.@amount+"."; close; } } } mes "Invalid input "+.@item+"."; close; Or better yet, invoke the atcommands @itemlist / @delitem if you want to save yourself work. (Not that it matters since I gave you the script, but in the future... XD)
  21. Euphy

    Delete Item

    Anything requiring windows to function differently than they're supposed to will require extensive source edits.
  22. Thanks for the reports! They're very helpful. c:

  23. Marked the other topic as "started" and rejecting this because it's a duplicate. Thanks nonetheless, Anakid.
×
×
  • Create New...