Jump to content

DeadlySilence

Members
  • Posts

    181
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by DeadlySilence

  1. Ok, I fixed this problem and tried to run it. The map server gives no more errors now. prontera,160,180,4 script GMs Online 857,{ // check if caching is enabled AND caching time is over OR caching is disabled if ((.caching && (.onlineCachingTime + .cachingTime <= gettimetick(2))) || !.caching) { query_sql( "SELECT `l`.`level`, DATE_FORMAT( `l`.`lastlogin`, '" + .dateString$ + "') as date, DATE_FORMAT(`l`.`lastlogin`, '" + .timeString$ + "') as time, `c`.`name`, `c`.`online` FROM `login` l " + "JOIN (`char` c) " + "ON (`l`.`account_id` = `c`.`account_id`) " + "WHERE `l`.`group_id` >= " + .minLevel + " " + "ORDER BY `c`.`online` DESC, `l`.`group_id` DESC, `c`.`name` ASC" , .group, .date$, .time$, .name$, .online$ ); set .onlineCachingTime, gettimetick(2); } // if .msgToChat is enabled, send the list directly to the chat if (.msgToChat) { dispbottom "GM List:"; for (set .@i, 0; .@i < getarraysize(.online$); set .@i, .@i + 1) { dispbottom "[Level " + .group[.@i] + "] " +.name$[.@i] + ": " + (("0" != .online$[.@i]) ? "online" : "offline" + ((.showLastOnline) ? ", last online at " + .date$[.@i] + " " + .time$[.@i] : "")); } end; } mes "[GM List]"; for (set .@i, 0; .@i < getarraysize(.online$); set .@i, .@i + 1) { mes "[Level " + .group[.@i] + "] " +.name$[.@i] + ": " + ("0" != .online$[.@i] ? "^00AA00online^000000" : "^FF0000offline^000000"); if ((.showLastOnline) && ("0" == .online$[.@i])) { mes "last online at " + .date$[.@i] + " " + .time$[.@i]; } mes "———————————————————"; } close; OnInit: // cache the results to prevent spam set .caching, 0; // caching time in seconds set .cachingTime, 30; // minimum level to be recognized as a GM set .minLevel, 1; // if activated, show when the GM was online the last time (account based) set .showLastOnline, 1; // format the date string (%Y for year, %m for month, %d for day) set .dateString$, "%m/%d/%Y"; // format the time string (%H for hour (24 hour format), %h for hour (12 hour format), %i for minute) set .timeString$, "%H:%i"; // show GM list directly to chat rather than in an NPC window set .msgToChat, 0; }
  2. It should work exactly like you already did it in your script.
  3. prontera,150,190,5 script Test 100,{ .@weight = 100 * Weight / MaxWeight; if (50 <= .@weight) { mes "You are currently at " + .@weight + " percent of your maximum weight."; close; } mes "Your weight is ok."; close; }
  4. Oh, right... I forgot eAthena doesn't support this method of setting variables... prontera,160,180,4 script GMs Online 857,{ // check if caching is enabled AND caching time is over OR caching is disabled if ((.caching && (.onlineCachingTime + .cachingTime <= gettimetick(2))) || !.caching) { query_sql( "SELECT `l`.`level`, DATE_FORMAT( `l`.`lastlogin`, '" + .dateString$ + "') as date, DATE_FORMAT(`l`.`lastlogin`, '" + .timeString$ + "') as time, `c`.`name`, `c`.`online` FROM `login` l " + "JOIN (`char` c) " + "ON (`l`.`account_id` = `c`.`account_id`) " + "WHERE `l`.`group_id` >= " + .minLevel + " " + "ORDER BY `c`.`online` DESC, `l`.`group_id` DESC, `c`.`name` ASC" , .group, .date$, .time$, .name$, .online$ ); set .onlineCachingTime, gettimetick(2); } // if .msgToChat is enabled, send the list directly to the chat if (.msgToChat) { dispbottom "GM List:"; for (set .@i, 0; .@i < getarraysize(.online$); set .@i, .@i + 1) { dispbottom "[Level " + .group[.@i] + "] " +.name$[.@i] + ": " + (("0" != .online$[.@i]) ? "online" : "offline" + ((.showLastOnline) ? ", last online at " + .date$[.@i] + " " + .time$[.@i] : "")); } end; } mes "[GM List]", ""; for (set .@i, 0; .@i < getarraysize(.online$); set .@i, .@i + 1) { mes "[Level " + .group[.@i] + "] " +.name$[.@i] + ": " + ("0" != .online$[.@i] ? "^00AA00online^000000" : "^FF0000offline^000000"); if ((.showLastOnline) && ("0" == .online$[.@i])) { mes "last online at " + .date$[.@i] + " " + .time$[.@i]; } mes "———————————————————"; } close; OnInit: // cache the results to prevent spam set .caching, 0; // caching time in seconds set .cachingTime, 30; // minimum level to be recognized as a GM set .minLevel, 1; // if activated, show when the GM was online the last time (account based) set .showLastOnline, 1; // format the date string (%Y for year, %m for month, %d for day) set .dateString$, "%m/%d/%Y"; // format the time string (%H for hour (24 hour format), %h for hour (12 hour format), %i for minute) set .timeString$, "%H:%i"; // show GM list directly to chat rather than in an NPC window set .msgToChat, 0; }
  5. This is no support section. It is a showcase for sprites and palettes. There is a comprehensive guide how to add custom items on our wiki: http://rathena.org/wiki/Custom_Items
  6. The usual way is this: close2; cutin "", 255; end; If this doesn't work, something is wrong on your side.
  7. This might work, but I didn't test it: prontera,160,180,4 script GMs Online 857,{ // check if caching is enabled AND caching time is over OR caching is disabled if ((.caching && (.onlineCachingTime + .cachingTime <= gettimetick(2))) || !.caching) { query_sql( "SELECT `l`.`level`, DATE_FORMAT( `l`.`lastlogin`, '" + .dateString$ + "') as date, DATE_FORMAT(`l`.`lastlogin`, '" + .timeString$ + "') as time, `c`.`name`, `c`.`online` FROM `login` l " + "JOIN (`char` c) " + "ON (`l`.`account_id` = `c`.`account_id`) " + "WHERE `l`.`group_id` >= " + .minLevel + " " + "ORDER BY `c`.`online` DESC, `l`.`group_id` DESC, `c`.`name` ASC" , .group, .date$, .time$, .name$, .online$ ); .onlineCachingTime = gettimetick(2); } // if .msgToChat is enabled, send the list directly to the chat if (.msgToChat) { dispbottom "GM List:"; for (.@i = 0; .@i < getarraysize(.online$); .@i += 1) { dispbottom "[Level " + .group[.@i] + "] " +.name$[.@i] + ": " + (("0" != .online$[.@i]) ? "online" : "offline" + ((.showLastOnline) ? ", last online at " + .date$[.@i] + " " + .time$[.@i] : "")); } end; } mes "[GM List]", ""; for (.@i = 0; .@i < getarraysize(.online$); .@i += 1) { mes "[Level " + .group[.@i] + "] " +.name$[.@i] + ": " + ("0" != .online$[.@i] ? "^00AA00online^000000" : "^FF0000offline^000000"); if ((.showLastOnline) && ("0" == .online$[.@i])) { mes "last online at " + .date$[.@i] + " " + .time$[.@i]; } mes "———————————————————"; } close; OnInit: // cache the results to prevent spam .caching = 0; // caching time in seconds .cachingTime = 30; // minimum level to be recognized as a GM .minLevel = 1; // if activated, show when the GM was online the last time (account based) .showLastOnline = 1; // format the date string (%Y for year, %m for month, %d for day) .dateString$ = "%m/%d/%Y"; // format the time string (%H for hour (24 hour format), %h for hour (12 hour format), %i for minute) .timeString$ = "%H:%i"; // show GM list directly to chat rather than in an NPC window .msgToChat = 0; }
  8. Ist dein Client up-to-date? Klingt, als würden dir die Maps nur im Client fehlen.
  9. I think there is a misunderstanding Euphy means the new group system has been implemented for a very long time. You can keep your current version, but you have to change the group_id in your database. For the groups and how to add new groups you can look at conf/groups.conf
  10. You can do it like this: query_sql("SELECT `balance` FROM `cp_credits` WHERE `account_id` = " + getcharid(3), .@balance); For every column you select you have to add another value at the end. If you want to select `balance` and `account_id`, you'd do it like this: query_sql("SELECT `balance`, `account_id` FROM `cp_credits`", .@balance, .@accountId);
  11. I think the query should look like this: query_sql "UPDATE `cp_credits` SET `balance` = `balance` + " + @vote + " WHERE `account_id` = " + getcharid(3) + " AND `balance` <> 0;"; means? <> is the operator for "not equal", the same as !=
  12. Obviously the 'robe' column is missing in the 'char' table. Did you import the rAthena sql files properly and without any error?
  13. I think he wants to add 5 ASPD to all characters permanently. So, if your character had 160, he wants 165.
  14. The question you should ask yourself is: does this even make sense? You should get uncorrupted GMs rather than taking away their privileges. Here's an example: Player X uses some cheat/bot tool to spam skills or to get some other unfair advantage. Your GMs couldn't do anything about it, because they can't warp to the player, nor kick/ban him. You should log commands to see if a player was kicked unjustifiably and remove the GM from your team if it happens too often
  15. DeadlySilence

    BET

    Try this: prontera,150,150,0 script Gambler 100,{ set .@npc$," [ " +strnpcinfo(1)+ " ]"; set .@chance, 30; // 30% chance set .@zeny, 40000000; mes .@npc$; mes "Bet with me, " + strcharinfo(0) + "!"; if (2 == select("Yes:No")) { next; mes .@npc$; mes "Okay, maybe next time."; close; } if (.@zeny > Zeny) { next; mes .@npc$; mes "I'm sorry, but you don't have enough Zeny. You need " + .@zeny + " to bet."; close; } next; if (rand(100) < .@chance) { mes .@npc$; mes "Hooray, you won!"; set Zeny, Zeny + ( .@zeny * 2 ); close; } else { mes .@npc$; mes "Too bad, you lost!"; set Zeny, Zeny - .@zeny; close; } } The same as Patskie's, but with more detailed output for the user.
  16. You need to configure it first. // minimum level to be recognized as a GM .minLevel = 0;
  17. You don't need to diff it manually, you can simply replace your current version with the latest script.
  18. Oh sorry, I must have missed that detail. Could you show your script, please?
  19. sir have u fix it ? I have fixed it one week ago with version 2.1
  20. You misuse some commands. Like the warnings already say, the commands expect strings, but you give them numbers.
  21. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt
  22. if (.@check_level > 4) { getitem 508, rand(1, 10); } else { getitem 507, rand(1, 10); } Like this.
  23. If you have 50% HP and 20% SP, you probably won't get full SP. Let's assume you always get 5% for HP and SP. You'll end up with this: (100% < 100%) && (70% < 100%) which results in "false" You will end up with 70% SP because it stops once either HP or SP are fully healed.
  24. You might want to change while( HP < MaxHP && SP < Max SP){ to while( HP < MaxHP || SP < Max SP){ because HP and SP aren't always at 100% at the same time
  25. Well, isn't that part an infinite loop: while(1){ progressbar "0x11CC99",2; percentheal rand(5),rand(5); }
×
×
  • Create New...