Jump to content

Haziel

Content Moderator
  • Posts

    639
  • Joined

  • Last visited

  • Days Won

    93

Everything posted by Haziel

  1. I could not understand the point on your request. When It is needed to compare MACs? It is to block Dual Account? And what is supposed to happens when two MACs are equal?
  2. Actually, It seems to be a bug of the OnSellItem. Find: if (!.@card_id) { mes " ^777777(none)^000000"; emotion e_swt; close; } Change: if (!.@card_id) { mes " ^777777(none)^000000"; emotion e_swt; next; close; } With a next it'll works.
  3. This is the THIRD thread you open with the same subject. You were already being helped here, and also opened this after. And now, a third one, this is NOT the correct way to ask for help. By the way... *sigh* To set it to 10 points, find: setarray .Points[0],1,5; // Points per <normal card>,<MVP card> And change to: setarray .Points[0],1,10; // Points per <normal card>,<MVP card> Done. As for it to only accept MVP Cards, find: for(set .@i,0; .@i<getarraysize(@sold_nameid); set .@i,.@i+1) if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700) { if (.Level) { query_sql("SELECT `LV` FROM `mob_db` WHERE `DropCardid` = "+@sold_nameid[.@i],.@lv); if (.@lv < .Level) { dispbottom getitemname(@sold_nameid[.@i])+" is under the minimum level."; continue; } } set .@card_id[getarraysize(.@card_id)], @sold_nameid[.@i]; set .@card_amt[getarraysize(.@card_amt)], @sold_quantity[.@i]; set .@mvp, compare(.MVP$,""+@sold_nameid[.@i]); mes ((.@mvp)?" ^FF0000":" ^777777")+@sold_quantity[.@i]+"x "+getitemname(@sold_nameid[.@i])+"^000000"; set .@card_total, .@card_total+(@sold_quantity[.@i]*((.@mvp)?.Points[1]:.Points[0])); } And change to: for(set .@i,0; .@i<getarraysize(@sold_nameid); set .@i,.@i+1) if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700) { set .@mvp, compare(.MVP$,""+@sold_nameid[.@i]); if (!.@mvp) { continue; } set .@card_id[getarraysize(.@card_id)], @sold_nameid[.@i]; set .@card_amt[getarraysize(.@card_amt)], @sold_quantity[.@i]; mes ((.@mvp)?" ^FF0000":" ^777777")+@sold_quantity[.@i]+"x "+getitemname(@sold_nameid[.@i])+"^000000"; set .@card_total, .@card_total+(@sold_quantity[.@i]*((.@mvp)?.Points[1]:.Points[0])); } It may works, I'm not entirely sure, it's untested.
  4. Can you belive that the problem in your code is that: 2941,MM_EVIL_SHADOW3 , Evil Shadow‚Evil Shadow,142,153400,1,8863,6736,1,2795,4062,89,44,120,87,66,33,106,27,10,12,2,6,47,0x37B5,150,432,432,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 2942,MM_EVIL_FANATICS , Evil Fanatic‚Evil Believer,151,8256000,1,1008650,988954,1,2949,4289,166,103,118,72,40,55,213,30,10,12,2,6,67,0x37B5,150,768,768,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 Commas, weren't real commas? At least, were not being read as commas.
  5. For that matter, you'll need to do a query_sql, otherwise, it'll only works when the character is online. set .@accid, "SELECT `account_id` FROM `char` WHERE `name` =" + @playersearchname; set .@wp, "SELECT `value` FROM `acc_reg_num` WHERE `key` = "#warningpoints" AND account_id = " + .@accid; mes .@wp + " points.";
  6. First, you need some to do some investigation on the lines it said the error is on (4853 and 20748), but, my guess is that your old source is using a function (probably pc_readregistry) in a old way. You should compare with any other fragment which use the same functions to see how it works nowadays.
  7. As I could search about, Flee is only Base Level + AGI (on Pre-Renewal), while the Hit is Base Level + DEX. To calculate the hit, the formula seems to be: Dodge Rate(%) = 100% - (Attacker Hit + 80 - Defenders Flee) It means, for your monster, yes, It has Flee 80. Dodge Rate(%) = 100% - (Attacker Hit + (Base Level + AGI) - Defenders Flee) Dodge Rate(%) = 100% - (Attacker Hit + 80 - Defenders Flee) DR = 100 - (Attacker Hit + 80 - 80) DR = 100 - Attacker Hit With 80 of Flee, the Player needs 100 of Hit so the monster be unable to dodge. (Again, these are Pre-Renewal mechanics!)
  8. Please, show how you edited your files.
  9. I thought about suggesting it, it's a really fancier way, but, focused on teach you what you wanted to learn. Glad you made it.
  10. Thor Generator is broken. The updater works but the generator corrupt files, specially when it comes to be non-grf patches. So, use Tokei's GRF Editor to generate your .thor files, it's easier and simpler to do it.
  11. As said in doc/script_commands.txt: *set <variable>,<expression>{,<char_id>}; *set(<variable>,<expression>{,<char id>}) This command will set a variable to the value that the expression results in. Variables may either be set through this command or directly, much like any other programming language (refer to the "Assigning variables" section). This is the most basic script command and is used a lot whenever you try to do anything more advanced than just printing text into a message box. set @x,100; will make @x equal 100. set @x,1+5/8+9; will compute 1+5/8+9 (which is, surprisingly, 10 - remember, all numbers are integer in this language) and make @x equal it. Returns the variable reference (since trunk r12870). You can add a target character at the end of set, but you need it's CharID: You're using the function set incorrectly, It's: set #warningpoints, #warningpoints + 1; // It means, set a new value to variable #warningpoints. // The new value is the current value of #warningpoints plus one. Now, let's target it to a player. Since you need to get the Char ID and you only have the Char Name, we need to convert it, using getcharid(): *getcharid(<type>{,"<character name>"}) This function will return a unique ID number of the invoking character, or, if a character name is specified, of that player. Type is the kind of associated ID number required: 0 - Character ID 1 - Party ID 2 - Guild ID 3 - Account ID 4 - Battle Ground ID For most purposes other than printing it, a number is better to have than a name (people do horrifying things to their character names). If the character is not in a party or not in a guild, the function will return 0 if guild or party number is requested. If a name is specified and the character is not found, 0 is returned. If getcharid(0) returns a zero, the script got called not by a character and doesn't have an attached RID. Note that this will cause the map server to print "player not attached!" error messages, so it is preferred to use "playerattached" to check for the character attached to the script. if (getcharid(2) == 0) mes "Only members of a guild are allowed here!"; Since you got the name via input: getcharid(0, $@warnplayer$) Let's attach it to set: set #warningpoints, #warningpoints + 1, getcharid(0, $@warnplayer$); // It means, set a new value for #warningpoints. // The new value is the current value of #warningpoints plus one. // Set it to the Char ID of the given Char Name via the variable $@warnplayer$ set by input. A simple look in doc/script_commands.txt could lead you to the solution...
  12. õ_o I can't exactly believe the solution, but, first, try these two: 2941,MM_EVIL_SHADOW3,Evil Shadow,Evil Shadow,142,153400,1,8863,6736,1,2795,4062,89,44,120,87,66,33,106,27,10,12,2,6,47,0x37B5,150,432,432,360,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 2942,MM_EVIL_FANATICS,Evil Fanatic,Evil Believer,151,8256000,1,1008650,988954,1,2949,4289,166,103,118,72,40,55,213,30,10,12,2,6,67,0x37B5,150,768,768,576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  13. data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\map
  14. En Browedit, vaya a View > Topcamera. Ahora, tome un Screeshot, pegar en cualquier editor de imágenes, cortar el mapa perfectamente y cambiar su tamaño a 240 x 240. Si el mapa no es un cuadrado, que se ajusta proportionaly en un archivo BMP 240x240. Recuerde que el ROSA (#FF00FF) genera un color transparente .
  15. En primer lugar, cambiar el nombre de los archivos se rompió ellos, tiene que volver a guardar ellos con Browedit . En segundo lugar, tratar de usar el software que he publicado anteriormente, WeeMapcache. Instalarlo, abre tu map_cache.dat con él e importar el .gat de su mapa personalizado, reinicie el servidor y ver si funciona .
  16. Mapas por lo general tienen un límite en la longitud de sus nombres, intente volver a guardar en browedit con un nuevo nombre más corto y añadirlo .
  17. Retire lo que se pone en resnametable.txt y ejecutar el mapcache. Esto sólo se utiliza cuando se está duplicando un mapa. Además, mi consejo para usted es utilizar WeeMapcache, es mucho más fácil.
  18. It means that the .act file is not with the same name of the .spr file. This files need to be together to work.
  19. Glad it worked. I'm here to help, don't mention it.
  20. I updated the mechanics of the Script you posted, try it: /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * ~~~~~~~~ Euphy's MVP Ladder v1.3 ~~~~~~~~ * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ prontera,148,170,6 script MVP Ladder 891,{ mes "[Rank MVP]"; mes "Hello."; mes "What are you doing here"; next; switch(select("Check Ranking.:My points.:Nothing...")) { case 1: mes "[Rank MVP]"; query_sql("SELECT char_id, CAST(`value` AS SIGNED) FROM `char_reg_num` WHERE `key` = 'MVP_Rank' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 20",.@cid,.@value); for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1) { query_sql("SELECT `name` FROM `char` WHERE char_id = "+.@cid[.@i]+";",.@j$); set .@name$[.@i], .@j$; } if (!getarraysize(.@cid)) mes "The rankings are empty."; else for(set .@i,0; .@i<getarraysize(.@cid); set .@i,.@i+1) mes "["+(.@i+1)+"] "+.@name$[.@i]+" ~ "+.@value[.@i]+" kills"; close; case 2: mes "[Rank MVP]"; mes "You killed "+((MVP_Rank)?"^0055FF"+MVP_Rank:"no")+"^000000 MVP"+((MVP_Rank == 1)?".":"s."); close; case 3: close; } OnNPCKillEvent: if (getmonsterinfo(killedrid,22)) { set MVP_Rank, MVP_Rank+1; if (MVP_Rank == 1) query_sql("INSERT INTO `char_reg_num` (`char_id`,`key`,`index`,`value`) VALUES ("+getcharid(0)+",'MVP_Rank','0',1)"); else query_sql("UPDATE `char_reg_num` SET `value` = '"+MVP_Rank+"' WHERE char_id = "+getcharid(0)+" AND `key` ='MVP_Rank'"); dispbottom "~ You killed "+MVP_Rank+" MVP"+((MVP_Rank == 1)?"":"s")+". ~"; dispbottom " ~ Reward: Cash +15 ~ "; set #CASHPOINTS, #CASHPOINTS + 15; specialeffect2 313; } end; } Let me know if there is any errors.
  21. 'o_o Oh, when did you download it?
  22. It's probably the fact that the table global_reg_value does not works this way anymore. To check it, what rev of rAthena are you using?
  23. The second digit of 3.14 is 1. In the constants of eAthena, RO means Ragnarok Online.
  24. Oh, alright. First of all, don't bother about Mobs' SP, this field is meaningless, they, actually, don't consume SP for using skills. By the way, my advice is, always use a mob similar to the mob you want to create to make a new one. About aDelay, aMotion and dMotion, as said in doc/mob_db.txt: aDelay: Attack Delay of the monster, also known as ASPD. Low value means faster attack speed, but don't make it too low or it will lag when a player got mobbed by several of these mobs. aMotion: Attack animation motion. Low value means monster's attack will be displayed in higher fps (making it shorter, too) (Thanks to Wallex for this) dMotion: Damage animation motion, same as aMotion but used to display the "I am hit" animation. Coincidentally, this same value is used to determine how long it is before the monster/player can move again. Endure is dMotion = 0, obviously. And also for Mode, you can read doc/mob_db_mode_list.txt.
  25. There's some error on your console? What are you trying to achieve and what's goin' wrong?
×
×
  • Create New...