Jump to content

Kenpachi

Members
  • Posts

    764
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Kenpachi

  1. Dunno what your problem may be, but at least there is a missing end; and because you're using mes you have to finalize the dialog with close;. - script AntiCheat -1,{ OnPCLoginEvent: if(getgmlevel() > 50) //GM Excemption end; if (readparam(bStr) > 99 || readparam(bAgi) > 99 || readparam(bVit) > 99 || readparam(bInt) > 99 || readparam(bDex) > 99 || readparam(bLuk) > 99){ mes "[^FF0000Anti Cheat System^000000]"; mes "We have detected you having stats over the limit. You will be disconnected shortly. If this is an error please contact the Game Master immediately."; sleep2 8000; // 8 Seconds delay atcommand "@block "+strcharinfo(0); announce strcharinfo(0) + " , You have been banned for having edited stats. Thank you for playing Medan Ragnarok Online.",0; close; } end; }
  2. You mean the variable player_point stay the same ? player_point -> 0 set player_point, player_point++; -> 0 ? Coz that's not true prontera,155,181,5 script test 100,{ set @player_point, @player_point++; dispbottom "Click number "+ @player_point; end; } In that case *Athena has a bug. ^^ BTW; That's not just in C but in every other language I know. static void Main(string[] args) { int x = 0; int y = 0; for (int i = 0; i < 10; i++) { y = x++; Console.WriteLine(y.ToString()); } Console.ReadKey(); } http://www.pic-upload.de/view-20951045/08.10.jpg.html If it's desired to work like you said, the operation should be ++i instead of i++. These are standards which everybody should follow them. static void Main(string[] args) { int x = 0; int y = 0; for (int i = 0; i < 10; i++) { y = ++x; Console.WriteLine(y.ToString()); } Console.ReadKey(); } http://www.pic-upload.de/view-20951176/08.10-2.jpg.html
  3. No, in *Athena you don't have to declare/initialize variables, just use them. If you try to access a non-existing variable 0 (or an empty string) will be returned.
  4. Yes, every time the player clicks on the NPC. EDIT: Actually it's not always 0. It can be 1 if player_point equals 0. That's because player_point will have the value of the result of that comparison (player_point==0):
  5. Exactly. That's what I'm talking about.
  6. Use tabulators instead of spaces to separate the values of the NPC header (first line of a script). http://rathena.org/wiki/Basic_Scripting#NPC
  7. Just for clarification: set player_point, player_point++; You try to set the veriable player_point to the result of player_point++. The result is, that player_point still holds the same value. Why? The result of an i++ operation wont change until the operation was finally executed while ++i knows the result while executing the operation. I'm bad in explaining. Maybe this explains it better: http://stackoverflow.com/questions/24853/what-is-the-difference-between-i-and-i Try this: OnHit: if (player_point==5) getitem 999,1; else { player_point++; // set player_point, player_point + 1; would do the same mes ""+player_point+""; goto L_change; }
  8. http://dev.mysql.com/doc/refman/5.1/de/select.html Da brauchst du eine WHERE-Klausel: WHERE `account_id` = 12345 12345 ist dabei natürlich durch die Account-ID, die du gerade brauchst, zu ersetzen.
  9. 127.0.0.1 and localhost are the same thing, both are pointing to the local computer, so you answer is completely pointless. Maybe you should think about your hosting service if you don't know the basics of computer systems. (I know, I sound harsh but it's the truth.) After setting up your MySQL server you have to create a user which is used by the RO server to communicate with the MySQL server. The account you created must have the proper privileges for your RO database to be able to select, edit and delete data. Most common way for newbie is to use the option "create database with same name and grant all privileges" (or something similar) when creating the user for the MySQL server. If you do so, you wont have to set up the privileges on your own. make sure you changes it in the config files and also in the "login" table of your database. If your phpMyAdmin is accessable through 127.0.0.1 it's on the local computer.
  10. Did I honestly use a variable name inside of a string? Damn; I need a vacation. Thanks for fixxing.
  11. You have to do some dirty math to achieve this. Change the bonus script from bonus bDelayRate,-30; to set .@cnt, isequippedcnt(4403); bonus bDelayRate, (.@cnt > 2) ? -1 * (30 / .@cnt * 2) : -30; Now the first to cards will have the full effect and every additional card will be ignored. There are some cases where more than two cards will nerf the bonus: Amount of cards | Bonus value 1 | -30 2 | -60 3 | -60 4 | -60 5 | -60 6 | -60 7 | -56 8 | -56 9 | -54 10 | -60 11 | -55 12 | -60
  12. @Patskie: 1. "break;" after "close;" is pointless since "close;" already terminated the script. 2. *Athena has a limit of 128 entries per array. So you'll only select the first 128 online players with that query. That's because there is an "end;" missing behind the switch block. The function "Display" return into the switch-block - "break;" is executed and nothing more happens; no "close;" no "end;".... Updated script (untested, because I'm at work): prontera,150,150,0 script Sample 100,{ function Display; if ( getgmlevel() < 60 ) end; set .@npc$, "[ " +strnpcinfo(1)+ " ]"; mes .@npc$; mes "What do you want, " + (Sex ? "Sir" : "Maam") + " " +strcharinfo(0)+ "?"; next; switch( select("PVP1:GVG:BG:Cancel") ) { case 1: Display("A GM wishes to observe the PVP, proceed there if you wish to join."); break; case 2: Display("A GM is calling all guilds wishing to fight in the GVG arena."); break; case 3: Display("A GM wishes to start the Battlegrounds, proceed to BG arena if you wish to participate."); break; case 4: close; default: break; } end; function Display { set .@query_i, 0; while(1) { query_sql "SELECT `char`.`account_id` FROM `char` JOIN `login` ON `char`.`account_id` = `login`.`account_id` LIMIT .@query_i, 128 WHERE `login`.`level` = 0 AND `char`.`online` = 1", .@aid; set .@query_i, .@query_i + 128; set .@size, getarraysize(.@aid); for(set .@i, 0; .@i < .@size; set .@i, .@i + 1) { if (attachrid(.@aid[.@i])) dispbottom getarg(0); detachrid; } if(.@size < 128) break; } return; } }
  13. Does the databse exist? Does the account "root" exist? Did you configure the privileges for account "root"? Did you change the the server communication account (s1/p1) and forgot an occurrence? Does the server communication account (s1/p1) exist in your "login" table? Is the database located on the same machine as the RO server? (Otherwise 127.0.0.1 wont work.) What does the error message tell?
  14. Nope, the guild table wasn't touched since rAthena exists.
  15. Oh; lol. I did not look at the data I just had a look on which column is for splash range... sorry. You are right. The 1:2:3:4:5 syntax is used for values which depend on the skill level. Since Ganbantein has a maximum level of 1 this doesn't make sense. Your attempt probably didn't work because of that, since 14 is the value for skill level 5 which obviously does not exist. Try axing that 5 values and set up your own. For example: 483,16,6,2,0,0x1,14,1,1,no,0,0,0,none,0, HW_GANBANTEIN,Ganbantein
  16. Have a look at ../db/re/skill_db.txt and search for HW_GANBANTEIN. Column 7 stand for the splash range.
  17. Alles gelogen hier. Torben is' voll der Schnacker. Schenkt ihm keine Beachtung!
  18. Hast dem User auch Rechte gegeben?
  19. Hab's nur mal nebenbei auf Arbeit dahingetippelt, konnte also nicht mal testen, ob es Fehler wirft, wenn der Parser drüber geht. Ansich sollte es aber so klappen. - script RemoveKaizelInWoE -1,{ OnPCLoadMapEvent: // WoE prüfen for(set .@i, 0; .@i < getarraysize(.CastleMapsWoE1$); set .@i, .@i + 1) { if(.CastleMapsWoE1$[.@i] == strcharinfo(3) && agitcheck()) { sc_end SC_KAIZEL; set .@Removed, 1; break; } } // Ggf. WoE:SE prüfen if(!.@Removed) { for(set .@i, 0; .@i < getarraysize(.CastleMapsWoE2$); set .@i, .@i + 1) { if(.CastleMapsWoE2$[.@i] == strcharinfo(3) && agitcheck2()) { sc_end SC_KAIZEL; break; } } } // Ende end; OnInit: setarray .CastleMapsWoE1$, "aldeg_cas01", "aldeg_cas02", "aldeg_cas03"; // Mehr WoE Maps hier! setarray .CastleMapsWoE2$, "aldeg_cas01", "aldeg_cas02", "aldeg_cas03"; // Mehr WoE:SE Maps hier! // Mapflags setzen, damit LoadMapEvent auch getriggert wird. for(set .@i, 0; .@i < getarraysize(.CastleMapsWoE1$); set .@i, .@i + 1) setmapflag .CastleMapsWoE1$[.@i], mf_loadevent; for(set .@i, 0; .@i < getarraysize(.CastleMapsWoE2$); set .@i, .@i + 1) setmapflag .CastleMapsWoE2$[.@i], mf_loadevent; end; }
  20. Ah, okay. Das hatte ich nicht bedacht. Dann wäre wohl die einfachste Möglichkeit, dass man ein kleines Skript schreibt, das beim betreten einer Castle-Map überprüft, ob gerade WoE ist und wenn ja, einfach sc_end SC_KAIZEL; ausführt.
  21. Dabei sollte dir die skill_nocast_db.txt weiterhelfen können.
  22. Dir fehlt (wie Bayne schon anmerkte) das SP1 für Visual Studio 2010. http://www.microsoft.com/de-de/download/details.aspx?id=23691
  23. Ob jemand online ist: query_sql("SELECT `online` FROM `char` WHERE `char_id` = " + getcharid(0), .@online); if(.@online) mes "online"; else mes "offline"; Wann sich jemand zuletzt eingeloggt hat (leider nur Account basiert mölich): query_sql("SELECT `lastlogin` FROM `login` WHERE `account_id` = " + getcharid(3), .@lastlogin$); mes "zuletzt online: " + .@lastlogin$; Sollte so funzen... habs nur schnell dahin getippelt.
×
×
  • Create New...