Jump to content

jaBote

Members
  • Posts

    182
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by jaBote

  1. With sleep command you detach the RID of the player and then you can't acces its variables.

     

    Either change the sleep appearances to sleep2 or save player name at the start of OnAgitBreak just like the guild name is saved. For the last one just add this line after OnAgitBreak:

     

    set .@name$, strcharinfo(0); 
    

    And change the strcharinfo in announcing line to .@name$ .

  2. You can easily do that via scripting and mapflags:

     

    -	script	dontwarphereplz	-1,{
    	OnPCLoadMapEvent:
    	if (!.init) donpcevent strnpcinfo(3)+"::OnInit";
    	getmapxy(.@map$,.@x,.@y,0);
    	for (set .@i,0; .@i < getarraysize(.RestrictedMaps); set .@i, .@i+1) {
    		if((.@map$ == .RestrictedMaps$[.@i]) && (getgmlevel() < MinGMLv)){
    			dispbottom "You shall not pass!!!!!!"
    			warp "SavePoint";
    		}
    	}
    	end;
    	
    	OnInit:
    	set .MinGMLv, 40;
    	setarray .RestrictedMaps$[0],"map1","map2","map3","map4","map5","map6","map7","mapN";
    	set .init, 1;
    	end;
    }
    
    map1	mapflag	loadevent
    map2	mapflag	loadevent
    map3	mapflag	loadevent
    map4	mapflag	loadevent
    map5	mapflag	loadevent
    map6	mapflag	loadevent
    map7	mapflag	loadevent
    mapN	mapflag	loadevent
    

    Not tested and may contain errors. I'm quite rusty on scripting right now.

  3. Well, I'm not updating the current SVN version I have for my own personal reasons, but I'm working on the additions separately to translate the new ones. However, the translation will have all lines in the same file. Working!

     

    Edit: I've translated it but I'll wait for Tragedy for revising the new messages. Link to the folder: https://drive.google.com/folderview?id=0B2UkVqklEED8Tkh5RmVqejhKc3c&usp=sharing

     

    Edit 2: Slightly revised by me, but it's preferable to be revised by another person for obvious reasons.

    • Upvote 2
  4. Nope. It's an issue in rAthena that loginlog is in the log database (the trunk/sql-files/logs.sql file you ran), not on the ragnarok one (the trunk/sql-files/main.sql file). Just dump the table structure with the help of PHPMyAdmin and make the table on the main db.

     

    But I'm almost certain that MySQL is not your problem. Try checking again IPs and ports and do what Emistry said. It wouldn't also be a bad idea to re-check the login_athena, char_athena, map_athena and log_athena conf files.

  5. It seems either you've edited map server's port or your Windows firewall has avoided communications between your map and char servers, but I don't know for sure.

     

    Try checking those two common issues.

  6. OMG that's a scripting command: you don't use it as a GM but NPCs and other items do.

     

    If you're a GM you can create permanent items with @item <item_ID or "item_name">. There's not a @rentitem GM command as long as I know.

     

    Try getting one of those items I showed you before from RateMyServer by using @item and use it. You'll get a rented item.

     

    If you still want a @rentitem GM command try asking for it on Source Requests - I'm not good in source.

    • Upvote 1
  7. How to activate what? How to make a rented item?

     

    You can easily know if you have it activated (which should be by default), just make and try one of these items and if they work, you have the command on your server.

     

    In case you're asking for that it's simple: just make an NPC or another item that uses the rentitem command. For example:

     

    Let's imagine you have an Item Renter NPC or an item which rents you an Angra Manyu (Item ID#1599) for 1 hour (3600000 milliseconds). Then the NPC or the item executes the following code:

    rentitem 1599,3600000;
    
  8. If you use NPCs or you even let all the job only to MySQL, resulting code will be tricky. First one becouse you'll have to loop over data and queries (remember arrays in scripting have up to 128 positions) and using only one SQL query will put you in need to do a subquery which returns two columns (account_id and amount of storage used). I'd suggest to use a PHP script with password protection, run it once and then delete it.

     

    Decide whatever you decide (NPC or PHP, but remember to loop if you use the NPC), there is the first query you need (edit the number 600 to the value of the max storage):

    SELECT `account_id`, COUNT(1) as `count` FROM `storage` WHERE `count` < 600
    

     

    I assumed every account has at least 1 storage space used for this. You don't need to have the count column but you need to calculate the number of spaces they have used. Then you save the account IDs in an array and launch another SQL query with the inserts while you go through the available IDs.

     

    Or well, you can send them all an email with the item... which is surprisingly easier.

     

    P.S.: Whoa! I've spent more than an hour trying to make an one-query reply without succeeding.

  9. It's supposed EVERY server comes with rentitem built in by default, unless you or your server provider have deactivated it. Look for BUILDIN_DUNC(rentitem) in /scr/map/script.c and see if you have it, which wou'll surely do.

     

    Are you sure you haven't used that script command incorrectly? Correct syntax for rentitem is:

    rentitem <item ID>,<duration in seconds>;
    

     

    Check if you forgot to put the seconds on your script.

    • Upvote 1
  10. I don't know what you menat so I'll explain it fully:

     

    Take your item_db.txt (in /db/{re or pre-re}/item_db.txt and look for those items:

    2357,Valkyrie_Armor,Valkyrian Armor,5,0,,2800,,55,,1,0xFFFFFFFE,2,2,16,,1,1,0,{ bonus bAllStats,1; bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stun,5000; },{},{}
    [...]
    2421,Valkyrie_Shoes,Valkyrian Shoes,5,0,,500,,13,,1,0xFFFFFFFE,2,2,64,,1,1,0,{ bonus bUnbreakableShoes,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bMaxHP,(BaseLevel*5); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,(JobLevel*2); },{},{}
    

     

    Add the effects I told you to add so they look like this (I underlined it) (seems the underline doesn't work on code boxes):

    2357,Valkyrie_Armor,Valkyrian Armor,5,0,,2800,,55,,1,0xFFFFFFFE,2,2,16,,1,1,0,{ bonus bAllStats,1; bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stun,5000; if (Class == Job_Soul_Linker) skill 19,5,2; },{},{}
    [...]
    2421,Valkyrie_Shoes,Valkyrian Shoes,5,0,,500,,13,,1,0xFFFFFFFE,2,2,64,,1,1,0,{ bonus bUnbreakableShoes,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bMaxHP,(BaseLevel*5); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,(JobLevel*2); if (Class == Job_Soul_Linker && isequipped(2357)) skill 19,5,2; },{},{}
    

     

    Then test if they do work properly. Once you've made those changes and saved the file you can restart your server or well use @reloaditemdb. As long as I know, they should work.

  11. Have you tried the Skill script command with flag 2?

     

    This is the script you should add to the OnEquip event to Valkyrian Armor (ID# 2357) and the Valkyrian Shoes (ID# 2421). I haven't tested it but should work. ADD the code at the end of the EXISTENT one in order not to lose the rest of the benefits of the original items:

     

    For the Valky Armor:

    if (Class == Job_Soul_Linker) skill 19,5,2;
    

     

    And for the Valky Shoes:

    if (Class == Job_Soul_Linker && isequipped(2357)) skill 19,5,2;
    

    If you want either one of them give 5 levels of fire bolt without the boots checking for the armor, add the same code from the armor on the boots.

     

    This way the Soul Linker will have it level 10. A known problem is if the Soul Linker has some other item of already knows Fire Bolt  that adds Fire Bolt Levels is that he/she will have it level 10+the level granted by the rest of the equip (see the link to the script command above), but I don't known how to fix that and I think it can't be helped right now.

  12. Just see the Field Manual 100% (Item ID# 14533 in /db/{re or pre-re}/item_db.txt or your SQL table if you use it) code:

     

    14533,Battle_Manual100,Field Manual 100%,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_EXPBOOST,1800000,100; },{},{}
    

    And its description:

     A manual that explains the effective way of the battle. It is a very detailed and well composed manual.
    Exp rate is increased to 100% for 30 minutes.

     

    I think you can figure out how to change that to make it last an hour. Just add a new item with that info.

  13. I was thinking if it would be possible to implement the same commands a GM has for managing NPCs (@loadnpc, @unloadnpc, @unloadnpcfile) as script commands. Yes I know you can use them as atcommands via scripting, but using them like that without a player attached makes me feel quite uneasy: I've had previous experience on atcommands that should run that way but they didn't (it was in eAthena though).

     

    So that's why I'm kindly asking if any of you could make a script command counterpart of those atcommands. That way we could use those commands without worrying. And I do also think they could be added to the SVN as official script commands. That way would make things easier for scripters.

     

    I'd also love to get both a reloadnpcfile atcommand and script command, but it's not my main request.

     

    Thank you all in advance!

  14. Supposing it doesn't have any errors, it should work exactly as a normal NPC. But it just works without anyone seeing it. I reccomend to load it as in the NPC configurations then restarting the server to make sure that OnInit event is run.

     

    Or well, you can simply add an OnWhisperGlobal label and then whisper to the NPC to make it run for the first time.

  15. It's quite easy, just see /conf/battle/monster.conf and look for this configuration:

    // Should mobs not spawn within the viewing range of players?
    // 0 is disabled, otherwise it is the number of retries before giving up 
    // and spawning the mob within player-view anyway, unless the max (100) is used,
    // in which case the mob will not be spawned, and it'll be retried again in
    // 5 seconds.
    // NOTE: This has no effect on mobs that always spawn on the very same cell
    // (like ant eggs) except if you set it to the max.
    no_spawn_on_player: 0
    

    Change it to whatever number you want and there you go.

    • Upvote 1
  16. I've finished translating map_msg.conf into Spanish, but it hasn't been revised yet. I've had problems translating some strings, especially those that aren't used in the source (why maintain them?). I've also had some problems with strings number 1332 and 1353 (related to @itemlist, @storagelist, @cartlist), as there's a harcoded part in them (which only says 'storage', 'cart' or 'inventory', I'd only want to translate inventory and cart because those ones are said and written in Spanish in Spanish-speaking communities). I've skipped translating both the headers of the file and any commented line.

     

    Do I post it before revision? I'd say it's mostly correct and as neutral as I've been able to translate it except for a bunch of them that should not be more than 20 of those messages.

    • Upvote 2
×
×
  • Create New...