Jump to content

sader1992

Content Moderator
  • Posts

    1678
  • Joined

  • Last visited

  • Days Won

    71

Posts posted by sader1992

  1. you can edit the cutin command script to accept char id at the end , and get the users list from the map using getmapunits and send the cutin in a for loop instead of attaching the players

    you can use this for reference on how to do it https://github.com/rathena/rathena/pull/4143/files

    if i am planing to do what you want to do , i would have done this from the start , because it's better to not attach a player when you can if it's a group of players

  2. The code syntax that you provided is wrong

    getmapflag("<map name>",<flag>) || getmapflag("<map name>",<flag>) || getmapflag("<map name>",<flag>)

    not

    getmapflag("<map name>",<flag> || getmapflag("<map name>",<flag> || getmapflag("<map name>",<flag>)))

     

    • Upvote 1
  3. On 7/1/2021 at 6:11 AM, lLoydxx said:

    my iteminfo.lub is almost 12mb, how could I find an iteminfo with the new BRO visuals to add to my server?

     

    Or how to fix mine, please help me I need the new looks.

    search for the item id.

    • Upvote 1
  4. function	script	my_global_func	{
    	mes "this message from 'my_global_func' function from out the npc";
    	return;
    }
    
    prontera,0,0,0	script	func_test	444,{
    	function my_func;
    	
    	my_func();
    	next;
    	my_global_func();
    	next;
    	callfunc("my_other_global_func");
    end;
    
    	function	my_func	{
    		mes "this message from 'my_func' function from inside the npc";
    		return;
    	}
    }
    
    function	script	my_other_global_func	{
    	mes "this message from 'my_other_global_func' function from out the npc";
    	return;
    }

     

    • Upvote 1
  5. set .item_id, 12903; // next item id to shower

    to

    set .item_id1, 12903; // next item id to shower

    and

    .@var = rand(2);
    makeitem .@var?.item_id:.item_id2,1,.@map$,.@x_diff,.@y_diff;   // <<< im stuck on this

    to

    makeitem getd(".item_id" + rand(1,8)),1,.@map$,.@x_diff,.@y_diff;   // <<< im stuck on this

     

     

    And this is a better way to do your script

    -	script	Sample	-1,{
    OnInit:
    	set .amount, 10; // amount of item to shower
    	setarray .ItemID,12903,12904,12905,12906,12907,12908,13576,13584;
    	.Size = getarraysize(.ItemID);
    
    	bindatcmd "itemshower",strnpcinfo(3)+"::OnShower";
    end;
    
    OnShower:
    	getmapxy(.@map$, .@x, .@y, BL_PC);
    	while ( .count < .amount ) {
    		do {
    			.@x_diff = .@x + rand(1,5);
    			.@y_diff = .@y + rand(1,5);
    		} while (!checkcell(.@map$,.@x_diff,.@y_diff,cell_chkpass));
    		makeitem .ItemID[rand(.Size)],1,.@map$,.@x_diff,.@y_diff;   // <<< im stuck on this
    		set .count, .count + 1;
    	}
    	set .count, 0;
    end;
    }

     

     

    btw "bindatcmd "itemshower",strnpcinfo(3)+"::OnShower";" means any player can use the command

  6. at the end of your rathena/npc/other/Global_Functions.txt add

    function	script	mes_ar	{
    	.@g$ = getarg(0);
    	explode(.@m$, .@g$, " ");
    	.@s = getarraysize(.@m$) -1;
    	for(.@i=.@s;.@i>=0;.@i--){
    		.@r$ += .@m$[.@i] + " ";
    	}
    	mes .@r$;
    	return;
    }

    How to use:

    prontera,0,0,0	script	xxxxxx	444,{
    	mes_ar "روح شوف كونوسوبا";
    end;
    }

     

    • Upvote 2
  7. i suggest to optimize your script , it does lack optimization and customization.

    i think you can write the same thing in less then 150 line with more customization options too.

    also the name well , not really a good name for the script.

     

  8. you are using the function name the same as the command name

    are you sure about the command name ?

    don't use the command name as a function name

    line 10 function    script    costume    {

    line 65 costume .@part,1; // Convert the Headgear

  9. 2 hours ago, Lily said:

    Update: I basically removed everything from my grf except for the lua folders, clientinfo and sclientinfo  and the texture/À¯ÀúÀÎÅÍÆäÀ̽º map for the login/userinterface. Issue still persists :(.

    so basically you know now that the issue is coming from the files that you didn't remove.

  10. 13 hours ago, andoy said:

    BTW in the weemapcahce you cant put .rsw so i put .gat file of the old izlude map

    extra steps is will do nothing right? xD

     

    it's all about the gat file

    use the .gat that you are already using in your data folder , or first grf

    put the gat file in your import mapcache , and everything will work

     

    if you changed the gat file in your grf too , you maybe added a wrong gat file to the map, so don't edit the gat file(replace it) as long as you don't know what you are doing

  11. 1 hour ago, Lily said:

    Update: We remade/rediffed our client with only the recommended diffs and the issue still persisted. Doesn't seem to be a problem in the diffs.

    If that is the case, then it's from your client files ,just test ,remove any unneeded file from the client files (grf) it's better to start from a clean grf then add your necessary edits only (after you test with the clean grf and confirm that the problem is gone)

×
×
  • Create New...