Jump to content

Rafael

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by Rafael

  1. No need to explain what the FB Hackercup is. You can read about it here: https://www.facebook.com/hackercup It's already started (2 days ago), and you have less than 22 hours left now (no worries, I haven't even read the problems yet too =P; and it seems like you only need to solve one problem correctly to advance to next round). To participate: https://www.facebook.com/hackercup/problems.php?round=598486203541358 If you are already participating, or intend to, let me know =D.
  2. @removed I'm feeling different now, so this comment doesn't apply anymore =P.
  3. @Will You mean blocking non-VIPs to access a map, or allowing only non-VIPs to access that map? - script block_nonvip -1,{ OnPCLoadMapEvent: if (!getgroupid() && strcharinfo(3) == "map_name") warp "prontera", 150, 150; end; } map_name mapflag loadevent Replace map_name with the name of the map.
  4. @rotest I'm not sure if there is a way to do it. It would be necessary to have an event updating the stats, and there is no event that does it (I guess). So, I can't do it for you =(. What you could do is to create an item that gives different stats for different players, depending on their VIP group. About the categories, if you explain me better where you want me to put it I can do.
  5. Well, just give me the scripts and I'll just insert the restrictions... Make a normal script become a VIP script is easy. Just put this in the beginning: if (!getgroupid()) { mes "You are not VIP."; close; }
  6. Sample for 15 days: 30000,vip15,Ticket 15 Days VIP,2,1,,1,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc ("vip_add", 86400 * 15); },{},{} The only thing that matters here is the script: callfunc ("vip_add", 86400 * 15); Just replace the "15" with the number of days.
  7. Yeah, it's really wrong, but not in line 8. Line 8 shouldn't cause any error, if you are using rAthena. Line 9 should cause an error, because it shouldn't be set .@i = 0;, but set .@i, 0; or .@i = 0;. The only error in line 8 is that it should be .@Input$, instead of .@input$. Are you sure you just COPIED the script, and didn't change ANYTHING? '-' Copy Annie's script, edit that .@input$ to .@Input$ and it should just work fine. @Annie Good solution, despite JOIN shouldn't be slow matching `account_id`, since it is indexed. @edit Generated a huge "fake" DB here, and executed the queries X times. Both took ~8.5s to run. So I'm still not sure about which is better, or if they are just the same... it should depend just on "lucky", since using a JOIN in a column that is indexed would result in a complexity O(N+M), the same for "select inside select", considering that only 1 result could match the WHERE clause (there are no identical names).
  8. VipAdmin updated. Only change: now, you input username, not account id.
  9. No, it doesn't. The command returns 0 for offline characters. So, better do an escape to the character name and search it first in `name` field. @edit Two possible solutions: Solution 1. Replace the query: SELECT `name`,`online` FROM `char` WHERE `account_id`='"+getcharid( 3,.@Input$ )+"' ORDER BY `char_num` ASC LIMIT 12 With: SELECT `char2`.`name`, `char2`.`online` FROM `char` LEFT JOIN `char` AS `char2` ON (`char`.`account_id`=`char2`.`account_id`) WHERE `char`.`name`='" + escape_sql (.@Input$) + "' ORDER BY `char2`.`char_num` ASC LIMIT 12 Solution 2. Replace the whole script with: prontera,157,178,5 script Sample 757,{ if( getgmlevel() >= 80 ){ mes "Input Player Name"; input .@Input$; query_sql "SELECT `account_id` FROM `char` WHERE `name`='" + escape_sql (.@Input$) + "'", .@aid; if (.@aid) { query_sql "SELECT `name`,`online` FROM `char` WHERE `account_id`='"+.@aid+"' ORDER BY `char_num` ASC LIMIT 12",.@Name$,.@Online; for( set .@i,0; .@i < getarraysize( .@Name$ ); set .@i,.@i + 1 ) mes " > "+.@Name$[.@i]+" "+( ( .@Online )?"Online":"Offline" ); }else{ mes "No Character found."; } } close; } I'm not sure about which is more efficient, so it's your decision....
  10. I don't know how. Probably would need to disassemble the hexed.
  11. No, I guess it isn't possible without editing the client.
  12. @Valiente I understand what you are saying, but I don't agree. This script just let Game Masters move players to a special group for a specific time. How you use these groups, isn't exactly my problem/fault. For example, last week I saw a server (I guess it's top2 in top200, but not sure) that gives VIP to players in exchange for a coin. This coin can be obtained in special events, minigames etc. But how a system where only admins can activate the VIP could be used for something like this? First, you could reward players for bringing their guilds to your server, through this script. You could also organize events in your forums (or ingame events) and reward the winners. If someone contributes to your server (I'm not talking about money), you could also reward them with VIP. Second, VipLib allows anyone to make their own scripts. My topic in Cronus has some different scripts using VipLib (like "points for vip", "vip on first login", "itens that activate vip for a certain time" etc). I intended to translate all these scripts, but I started by VipAdmin (could have been any other of those scripts) and then just lost my will =/, because I really didn't intend to have to make all the scripts. I've developed this library so other people could make their own scripts (and share it). But it isn't what I'm seeing. I ended up having to develop all the scripts we have, nowadays, (shared) for the system. Just saw other people using it for commercial reasons. Like, "I have a client that asks me a VIP system with some features; there's a lib that will make my job easier, so let me use it". Yeah, I know it because, in the first releases, only those guys reported me the bugs of the lib (I released only VipLib first, only released the rest when I saw no one would share scripts based on this lib, so I needed to give it a reason rather then commercial usage). But, sure, people can also use it to thank for donations. That's why these groups are also called "donaters". I know it looks like "selling", but it isn't totally. If a player helps your server, giving you suggestions, good scripts, good source modifications, new items etc, and it's ok to reward them with VIP, why isn't it when they help your server with money? I know Game Masters use the money to other things, instead of the server. It's just one of the huge amount of possibilites you could do with this script. And, even in these cases, I think the GMs deserve the money. Follow me: you get $200 a month; you should use it for the server: maybe BUY some new scripts, or some new systems, buy some good ideas, or what else could make your server better. What if YOU develop the scripts, the systems, and YOU have the new ideas? Why can't you pay yourself with the money the server earned? Maybe this is totally wrong, but maybe it's not; if you are dedicating your time to the server, I think you deserve it. You know I don't know English very well, so sorry for any mistake. If you can also point me the mistakes, so next time I can write it right, thank you =D. @rafoka Thanks =D
  13. @Will Made it now (just adapted v1.2b): http://rafaworks.zzl.org/root/scripts/accountmanager/viplib/v1.2b.eA.txt Use VipAdmin v1.1 instead of v1.2: http://rafaworks.zzl.org/root/scripts/accountmanager/npc/vipadmin/en.v1.1a.txt Didn't test, if you find any bug please report. @Valiente What? O.o
  14. You're welcome I'm going to college right now, bye =P. @edit - Takumirai Released new version. Just update VipLib and download the npc that adds tags: http://codepad.org/3nUfxrbW If you can't access the link above, here is the code: function script VIP_setPlayerTag { set .prefix$, "[VIP] "; if (getcharid (3)) { if (@VIP_UsingTag && !getgroupid()) { atcommand "@fakename"; set @VIP_UsingTag, 0; } else if (!@VIP_UsingTag && getgroupid() && $@AM_Vip_IsValidGroup[getgroupid()]) { atcommand "@fakename " + .prefix$ + strcharinfo (0); set @VIP_UsingTag, 1; } } return; } - script VIP_setPlayerTag#init -1,{ OnInit: set $@AM_Vip_CallOnRefresh$[getarraysize ($@AM_Vip_CallOnRefresh$)], "VIP_setPlayerTag"; end; }
  15. @Dark Ok, it will help anyone who wants to make the changes below. =D @rotestserver Great xD. So... 1. Open: src/map/atcommand.c 2. Search for ACMD_FUNC(adjgroup) 3. Remove the lines: clif_displaymessage(fd, msg_txt(1228)); // Group changed successfully. clif_displaymessage(sd->fd, msg_txt(1229)); // Your group has changed. 4. Recompile. @Takumirai Okay , just wait for v1.4 and I'll make it. I'm downloading RO right now, and today after college I'll test v1.3a, and maybe tomorrow (or today) release v1.4 of VipLib.
  16. Not script this time =D, but rAthena's source code. You will need to recompile your emulator. Do you know how to do it? (I guess there're some tutorials about it) @edit Has someone tried the new version (v1.3a) of VipLib? I need to know if it's working properly or not before making v1.4 =(.
  17. @rotestserver Yeah, about it I can't do anything =(. If you really want to fix it you will need to edit the source of rAthena and rebuild. Tell me if you want... I tell you what to do. That messages is the command that produces, only thing I could do I did (verifying if it's REALLY necessary to run the command before doing it, and always you login it's required). The guy in Cronus was using the old versions, that's why he was being spammed. @GM Takumirai Do you mean, attrib him a "fake name" or change the real name?
  18. With VipAdmin? Still not possible. I intend to update it later. But if you really need it know, I can update. It's not a huge modification, so... @edit A guy in Cronus reported me a bug. He said that the non-VIP players are being spammed by the message "Your group has been changed". Is someone here with the same problem? Because I didn't find any bug in the code =/, not sure if it was my mistake or his mistake.
  19. New version released. I can't test it right now, but if someone finds a bug, please report.
  20. Ok, thanks a lot for you dedication, Whoteva =D. I will release the new version tomorrow (Saturday). Don't know the exact time, but I will.
  21. I think it would be a good idea to add some commands to work with groups. When we had levels instead of groups, it was so much simplier... but working with groups is really complicated, since we never know when a group exists or not. If we try to change a player's group to one that does not exist, we can see that it doesn't exist just checking his getgroupid() after the change, but the player will still get an error in his chatbox saying the group doesn't exist. If we change it succefully, he gets two messages saying almost the same thing: your group has been changed (I'm talking about @adjgroup). Since rAthena doesn't use the simpliest system of levels anymore, I hope your development team can make some good commands for the new system. So scripters can take some advantage of this change (for now, this change just SUCKS for scripts, despite it's really great for organization in conf path). What I'm suggesting: If you do not understand something, please let me know me and I'll try to explain it better. English isn't my native language and I've never practiced it, so sorry for any mistake. Thanks for reading =D.
  22. I was sleeping =P. Are you sure you are using the latest version? Because I tried to Ctrl+F for readlv on the files, and I found nothing. If you are using VipManager, remove it. VipLib v1.2b doesn't require VipManager anymore. Add Vip adds some vip time the current player's vip time. I mean: if the player has 3 days VIP and you add more 7 days, he will end with 10 days. Set Vip just alters the vip time of the player. If he has 3 days of VIP and you set to 8 days, he will end with 8 days.
  23. Sorry, and thanks for the report. http://rafaworks.zzl.org/root/scripts/accountmanager/npc/vipadmin/en.v1.2a.txt
×
×
  • Create New...