Jump to content

Sehrentos

Members
  • Posts

    91
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Sehrentos

  1. Great work.

    I too like the idea of fully customizable client and this will accomplish it.

    Too bad that the browsers does not support direct UDP socket out of the box. So the wsProxy is used to forward the clients WebSocket to the rAthena server in UDP. WebSockets are little slower in this approach but it feels playable anyway. This is in PWA's perspective and not ChromeApp or what was it.

    I saw a few possible issues or optimizations when blasting through the sources:

    1. Network/PacketRegister.js - 0x84a has duplicate PACKET.CZ.NPC_TRADE_QUIT | PACKET.CZ.CASH_SHOP_CLOSE, later one will override.
    2. Skills/SkillDescription.js - has 1309:ish unnecessary join loops, they could just be template strings or concatenation of string values (i'm not talking about Array.concat).

    3. Status/StatusInfo.js - ison: "masquerade_laziness.tga" -> typo "icon", not "ison".

    4. Renderer/EffectManager.js - First in spamSkillBeforeHit var EF_Init_Par declared object, but is never used. Second the property SkillEffect prop beforeHitEffectIdOnCaster is no where to be found in the entire project, possible naming typo here. Third skill that declare more than one var effects, to use, should declare it at the beginning, and reuse the same variable (same for the var EF_Init_Par)?
    5. UI/Components/CashShop - One of the two case 'CartItems': is missing break;
    6. UI/Component/PincodeWindow - has empty "t" file
     
    I will try to make a pull request if I'm not too busy. Tough these seems minor, since no one noticed.

    Overall it's nice project and I like it very much. Thanks to all contributing to the project 🙂

    • Love 1
  2. Thank you, but that just didn't work for me.

    I found the existing windows DLL file in the /SysWOW64 and copied to the /System32, but no success.

    I also tried to install: Visual C++ Redistributable for Visual Studio 2012 Update 4, but no success (this should install the original windows msvcr110.dll x86 or x64 depending on your system).

    Rebuild the map-server after each changes and tested again.

  3. Hey,

    I tried installing and compiling the project solution in visual studio, by following guides found in the forums, since the installation guidelines in the github also did not work.

    Problem is after successful compile, the map-server stops and report about missing msvcr110.dll and after finding the right dll file, then it crashes in 0xc000007b error.

    The project was rebuild in release mode x64.

    Windows 11 environment.

  4. Hey,

    Have you tried with this ?

    *recovery <type>{,<option>,<revive_flag>{,<map name>}};
    
    This command will revive and fully restore the HP/SP of the selected characters.
    It returns 1 upon successful use.
    
    <type> is the target, and determines the <option> parameter:
     0: Player  -> Character ID number
     1: Party   -> Party ID number
     2: Guild   -> Guild ID number
     3: Map     -> Map name (a string)
     4: All     -> None (takes <revive_flag> as option)
    
    If no option is specified, the invoking player's character ID, party ID, guild ID,
    or map will be used.
    
    <revive_flag> determines the action:
     1: Revive and heal all players (default)
     2: Heal living players only
     4: Revive dead players only
    
    <map name> can optionally be used to define a single map to execute the command on
    for types 1 (party) and 2 (guild).
    
    Example:
    recovery 1, getcharid(1);

     

  5. On 3/12/2020 at 6:10 PM, Dakado said:

    Why is that I am getting many errors ? The syntax seems completely messed up somehow, maybe pastebin issue ?

     

    
    [Error]:  Loading NPC file: npc/custom/dakado/worldboss.txt
    script error on npc/custom/dakado/worldboss.txt line 177
        parse_simpleexpr: unmatched ')'
       172 :     .@monster_id = .event_mobs[ .@rand_mob ];
       173 :
       174 :     // Select random map
       175 :     .@i = 0;
       176 :     .@rand_map = rand( getarraysize( .event_maps$ ) ); // Random map index number
    *  177 :     while(inarray'('$@WB_MAP$[0], .event_maps$[.@rand_map]) != -1) {
       178 :         if(.@i > .loop_max) {
       179 :             debugmes .npc_name$+"::OnEnable event map max loop count!";
       180 :             //announce "[World Boss] Event has been cancelled! Could not find free event map!", BC_ALL, 0xFF0000;
       181 :             end;
       182 :         }
    [Error]: npc_parsesrcfile: Unknown syntax in file 'npc/custom/dakado/worldboss.txt', line '943'. Stopping...
     * w1=function    script  WB_ResetPartyAccess {
     * w2=
     * w3=
     * w4=
    [Info]: Done loading '18578' NPCs:
            -'3882' Warps
            -'284' Shops
            -'14411' Scripts
            -'3722' Spawn sets
            -'56389' Mobs Cached
            -'0' Mobs Not Cached

     

     

    Hi, I think its because inarray function does not exist. Check if your server support it in script commands.

  6. Hey @max65

    On 11/22/2018 at 3:58 AM, max65 said:

    hi, thx for this script but on my server he doesnt work =s

    No idea.. I have not been able to produce this effect on my test server.

     

    Hey @melv0

    On 2/14/2019 at 10:16 AM, melv0 said:

    i think, i found bug on Maks HP

    i try to setting maks HP 100Million, but when the spawn always get maks hp 5million

    I have not been able to produce this effect on my test server.

     

    @CyberDevil

    On 2/28/2019 at 1:38 PM, CyberDevil said:

    How can I set the amount of a given loot in the treasure chest?
    For example, I am now forced to set the ".loots_0" in this way to have 5 equal 7711 items:
     

    
    setarray .loots_0[0], 7711, 7711, 7711, 7711, 7711;

    ...and why the NPC in Prontera change sprite and size every reload script or restart server?

    Yes, i have not added amount array for the loots so that would need a little editing.

    To disable random appearance, comment (//) these lines out:

    // Set NPC size if class_id supports
    .@npc_class = rand(495, 498);
    .@npc_size = rand(0, 2); // 0=normal, 1=small, 2=big
    setnpcdisplay(strnpcinfo(0), strnpcinfo(1), .@npc_class, .@npc_size);

     

    Sorry for slow reply. I don't visit here so often any more.

  7. Greetings,

    Many times when i see some monster scripts like where you kill a MVP and get extra loots from. It is many times implemented as treasure chest monster that get summoned after MVP is killed and will trigger OnMobDie label. There it checks if he was the actual killer and is able to receive rewards.

    If there are many players nearby trying to kill same MVP and spamming AOE skills. This treasure chest's event label will get triggered on the first one who got the kill. So players keep spamming AOE, and the actual player who has the right to claim the reward keeps spamming AOE or wait until all players leave or get a lucky hit on it.

    How I implement this kind of event is by calling an NPC to that location and only the player who has access to the rewards will have a dialog open etc.

    So, my question is (I'm interested) how would you proceed in this kind of situation? Would it be with a Treasure Monster or Treasure NPC or Not summoning a visual treasure and just open dialog on MVP kill?

    Here is sample with monster unit:

    -	script 	Sample	-1,{
    OnInit:
    	monster "prontera",0,0,"--ja--",1093,1,strnpcinfo(0)+"::OnMobDie";
    	end;
    
    OnMobDie:
    	getmapxy(.@map$,.@x,.@y,0);
    	monster .@map$,rand(.@x,.@x-3),rand(.@y-3,.@y),"--ja--",1324,1,strnpcinfo(0)+"::OnBoxKill";
    	end;
    
    OnBoxKill:
    	// If checks your able to receive rewards
    	//...
    	// Else summon Treasure Chest again...
    	getmapxy(.@map$,.@x,.@y,0);
    	monster .@map$,rand(.@x,.@x-3),rand(.@y-3,.@y),"--ja--",1324,1,strnpcinfo(0)+"::OnBoxKill";
    	end;
    }

    Here is sample with npc unit:

    -	script	Sample	-1,{
    OnInit:
    	monster "prontera",0,0,"--ja--",1093,1,strnpcinfo(0)+"::OnMobDie";
    	end;
    
    OnMobDie:
    	// ... save players access data ...
    	// Get map coordinates for the Treasure Chest NPC
    	getmapxy(.event_map$, .event_x, .event_y);
    	.@index = 0; // Select what treasure npc to open
    	.@npc$ = "Treasure Chest#tc_"+ .@index;
    	donpcevent .@npc$ +"::OnEnable";
    	end;
    }
    
    // Treasure Chest NPC index = 0
    prontera,0,0,5	script	Treasure Chest#tc_0	1324,{
    	// If check player is able to receive rewards
    	//... dialogs ...
    
    	// If player received rewards, remove treasure NPC after close
    	close2;
    	.@index = 0;
    	.@npc$ = "Treasure Chest#tc_"+ .@index;
    	donpcevent .@npc$ +"::OnDisable";
    	end;
    
    OnInit:
    	.@name$ = strnpcinfo(0);
    	getmapxy(.map$, .x, .y, UNITTYPE_NPC); // Save default position
    	disablenpc .@name$;
    	end;
    
    OnDisable:
    	.@id = getnpcid(0);
    	.@name$ = strnpcinfo(0);
    	unitwarp( .@id, .map$, .x, .y ); // Return to default position
    	disablenpc( .@name$ );
    	end;
    
    OnEnable:
    	.@id = getnpcid(0);
    	.@name$ = strnpcinfo(0);
    
    	// get coordinates from event npc
    	.@npc$ = "Sample";
    	.@map$ = getvariableofnpc(.event_map$, .@npc$);
    	.@x = getvariableofnpc(.event_x, .@npc$);
    	.@y = getvariableofnpc(.event_y, .@npc$);
    
    	enablenpc( .@name$ );
    	unitwarp( .@id, .@map$, .@x, .@y ); // Move to new position
    	end;
    }
    
    // You can also duplicate more treasure chests, if you need more
    alberta,0,0,5	duplicate(Treasure Chest#tc_0)	Treasure Chest#tc_1	1324

    I would love to hear your thoughts and ideas.

    Thanks ?

     

  8. 12 hours ago, Quesooo said:

    @Musika6988 @Sehrentoshi there thank you for your script 

     

    - after killing the world boss my server rates go down 1/2

     

    for example my server rate is x50 after killing the world boss or reloading the npc the rates goes to x25 where do i change it so that wont affect my original server rates thank you

    Hey,

    Thank you. There is option to turn off the floating rates:

    .use_floating_rates = 0;    // Increase servers exp and drop rates for 1 hour after boss kill(0=Disable, 1=Enable)

     

  9. 6 minutes ago, lelouchxv said:

    how can i do that sir? i dont really know. im new to sql debugging ?

    Open the file in any text editor and edit that query_sql line:

    query_sql "SELECT char.char_id, char.name, char_reg_num.value FROM char_reg_num LEFT JOIN `char` ON char.char_id=char_reg_num.char_id WHERE char_reg_num.key='brokeemp' ORDER BY CAST(char_reg_num.value AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count;

    Then save it ?

    Complete sample: https://pastebin.com/5EFXpJnH

  10. Trigger 2 times a week in certain time and gives all available players a packet/item/etc.

    Or with a GM command @woebonus

    -	script	#atcmd_woebonus	-1,{
    OnInit:
    	bindatcmd "woebonus", strnpcinfo(3)+"::OnAtCommand",10,10;
    	end;
    
    OnAtCommand:
    	showscript "WoE Bonus!!", getcharid(3), SELF;
    OnSun1600: // Every Sunday 4:00pm
    OnWed1600: // Every Wednesday 4:00pm
    	// Attach all available players
    	addrid(0);
    
    	// Give package/items/etc.
    	getitem 501,1;
    
    	// Announce current player about it
    	announce "WoE Bonus Received!",BC_SELF,0x00FF00;
    	end;
    }

    Oops, forgot about this part:

    Quote

    the npc deliver the items as soon as the leader requests once each WoE.

    :ani_swt3:

  11. 42 minutes ago, NakedWolf said:

    but if there are players playing from a cafe if the script is using IP fetch all the players in the cafe will be kick out rite ? like only one player from the cafe can login rest all will be kicked

    Yup, forgot. Same public IP over wi-fi ? but, you can limit the coffee house users at least :heh

  12. A possible workaround would be to use IP detection script with login event:

    OnPCLoginEvent:
    	.@rows = query_sql("SELECT login.account_id FROM login INNER JOIN `char` ON char.account_id=login.account_id WHERE login.last_ip='"+getcharip()+"' AND char.online=1;", .@account_id);
    	if (.@rows > 2) {
    		mes "[IP notice]";
    		mes "Too many online from same IP address.";
    		// Block, Kick, etc.
    		pcblockmove getcharid(3),1;
    		pcblockskill getcharid(3),1;
    		sleep2 5000;
    		atcommand "@kick " + getcharid(0);
    		close;
    	}
    	end;

     

  13. Thank you @Rene

    That worked for me /no1

    This is the final result if any one is interested:

    // callsub(S_ForgeProperty, @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i])
    S_ForgeProperty:
    	.@card2 = getarg(0);
    	.@card3 = getarg(1);
    	.@card4 = getarg(2);
    	// 1 - Ice, 2 - Earth 3 - Fire 4 - Wind.
    	// Calc formula: ElementNumber + ((StarCrubNumber * 5) << 8)
    	.@char_id = (.@card4 << 16) | .@card3;
    	// Character ID's start from 150000
    	if (.@char_id >= 150000) {
    		// Using strcharinfo(0,.@char_id) will throw Error if player is offline...
    		// So we use good old SQL query:
    		query_sql("SELECT name FROM `char` WHERE `char_id`="+.@char_id, .@char_name$);
    	} else {
    		setarray .@char_name$[0], "Unknown";
    	}
    	switch(.@card2) {
    		case 3840: .@name$ = "Very Very Very Strong "+ .@char_name$[0] +"'s Neutral"; break;
    		case 3841: .@name$ = "Very Very Very Strong "+ .@char_name$[0] +"'s Ice"; break;
    		case 3842: .@name$ = "Very Very Very Strong "+ .@char_name$[0] +"'s Earth"; break;
    		case 3843: .@name$ = "Very Very Very Strong "+ .@char_name$[0] +"'s Fire"; break;
    		case 3844: .@name$ = "Very Very Very Strong "+ .@char_name$[0] +"'s Wind"; break;
    		case 2560: .@name$ = "Very Very Strong "+ .@char_name$[0] +"'s Neutral"; break;
    		case 2561: .@name$ = "Very Very Strong "+ .@char_name$[0] +"'s Ice"; break;
    		case 2562: .@name$ = "Very Very Strong "+ .@char_name$[0] +"'s Earth"; break;
    		case 2563: .@name$ = "Very Very Strong "+ .@char_name$[0] +"'s Fire"; break;
    		case 2564: .@name$ = "Very Very Strong "+ .@char_name$[0] +"'s Wind"; break;
    		case 1280: .@name$ = "Very Strong "+ .@char_name$[0] +"'s Neutral"; break;
    		case 1281: .@name$ = "Very Strong "+ .@char_name$[0] +"'s Ice"; break;
    		case 1282: .@name$ = "Very Strong "+ .@char_name$[0] +"'s Earth"; break;
    		case 1283: .@name$ = "Very Strong "+ .@char_name$[0] +"'s Fire"; break;
    		case 1284: .@name$ = "Very Strong "+ .@char_name$[0] +"'s Wind"; break;
    		case 0: .@name$ = .@char_name$[0] +"'s Neutral"; break;
    		case 1: .@name$ = .@char_name$[0] +"'s Ice"; break;
    		case 2: .@name$ = .@char_name$[0] +"'s Earth"; break;
    		case 3: .@name$ = .@char_name$[0] +"'s Fire"; break;
    		case 4: .@name$ = .@char_name$[0] +"'s Wind"; break;
    		default: .@name$ = ""; break;
    	}
    	return .@name$;

     

×
×
  • Create New...