Jump to content

Alexandrite

Members
  • Posts

    54
  • Joined

  • Last visited

Posts posted by Alexandrite

  1. this is example of my currently use

    OnInit:
    	waitingroom "Waiting Room",20,"Peter S. Alberto#job_league::OnStartArena",1;
    	enablewaitingroomevent;
    
    	end;
    
    OnStartArena:
    	warpwaitingpc "job_prist$",24,44;
    
    	attachrid $@warpwaitingpc;
    
    	if (BaseJob == Job_Priest) {
    		goto OnStart;
    	}else if(BaseJob == Job_Acolyte){
    		donpcevent "Zombie_Generator#job_league::OnEnable";
    	}
    
    	disablewaitingroomevent;
    	end;
    OnStart:
    	enablewaitingroomevent;
    	end;

    This Code is worked...

     

    But it's wrong order because this code already trigger after you got trigger "warpwaitingnpc" and then you "attachrid" later

     

    I would like to make a room condition right after they enter the chatroom

    as if when you enter the room if(BaseJob == Job_Priest) or if(BaseJob == Job_Acolyte) or if(BaseJob == XXXX)

    I mean I want it check in the begining of when player enter the ChatRoom

    And I would like command to click the player that not met condition out of that Room too

     

    Is it possible ?

    I mean i want to make a room that people who met Condition only who can enter ?

    Thank you and sorry for my bad endlish

  2. here it's my script, but this script is work as individual and work as the last killed

    function	script	get_special_item	{
    	set .@item_id, getarg(0);
    	set .@chance, getarg(1);
    	set .@rand, rand(1, 10000);
    
    	if(getstatus( SC_ITEMBOOST, 0 )){
    		.@chance = .@chance*2;
    	}
    
    	if(.@rand <= .@chance) {
    		getitem .@item_id, 1;
    	}
    
    	//dispbottom .@rand+"/"+.@chance;
    
    	return;
    }

     

    // Number Format
    //============================================================ 
    function	script	number_format	{
    	set .@str$, getarg(0);
    
    	for(set .@i,getstrlen(.@str$)-3; .@i>0; set .@i,.@i-3)
    		set .@str$, insertchar(.@str$,",",.@i);
    
    	return .@str$;
    }

     

    OnNPCKillEvent:
    	// 2 : Mob Name , 3 : Mob Lv
    	//announce "OnNPCKillEvent : "+ strmobinfo(2, killedrid),bc_all,0xFFFF00;
    	//announce "OnNPCKillEvent : "+ strmobinfo(3, killedrid),bc_all,0xFFFF00;
    	//announce "OnNPCKillEvent : "+ JobLevel,bc_all,0xFFFF00;
    
    	//.@Point = rand(BaseLevel/2, BaseLevel)+rand(JobLevel/2, JobLevel)+(rand(strmobinfo(3, killedrid)/2, strmobinfo(3, killedrid)));
    	.@Point = 1+rand((strmobinfo(3, killedrid)/2), strmobinfo(3, killedrid)) + rand(strmobinfo(7, killedrid)/5, strmobinfo(7, killedrid)/(9/2));
    	.@Point$ = callfunc("number_format", .@Point);
    
    	#CASHPOINTS = #CASHPOINTS+.@Point;
    
    	dispbottom "ได้รับ "+.@Point$+" พอยท์ คงเหลือ "+callfunc("number_format", #CASHPOINTS)+" พอยท์";
    
    	//for(.@i=0, .@i<10000; .@i++){
    
    	callfunc("get_special_item", 14533, 1);	// Battle Manual
    	callfunc("get_special_item", 14592, 1);	// Job Battle Manual
    	callfunc("get_special_item", 12210, 1);	// Bubble Gum
    	callfunc("get_special_item", 12209, 1);	// Life Insurance
    	
    	callfunc("get_special_item", 12075, 1);	// STR+10 Food
    	callfunc("get_special_item", 12090, 1);	// AGI+10 Food
    	callfunc("get_special_item", 12085, 1);	// VIT+10 Food
    	callfunc("get_special_item", 12080, 1);	// INT+10 Food
    	callfunc("get_special_item", 12095, 1);	// DEX+10 Food
    	callfunc("get_special_item", 12100, 1);	// LUK+10 Food
    
    	callfunc("get_special_item", 12122, 1);	// HIT Food
    	callfunc("get_special_item", 12123, 1);	// FLEE Food
    	callfunc("get_special_item", 12124, 1);	// ATK Food
    
    	callfunc("get_special_item", 984, 1);	// Oridecon
    	callfunc("get_special_item", 985, 1);	// Elunium
    
    	//	sleep2 1;
    
    	//}
    
    	end;

    But I would like it's work like a party loop or something

     

    I mean assume I just kill 1 monster then let OnNPCKillEvent just work but the script just check if I in party or not and if yes let make this script loop and work for the whole party

    or what i mean i would like everyone in party have the same chance of getting special item drop by doesn't care who's the one that killed monster, no matter who kill, whole party get the same chance

    is it possible ? from my opinion i think it's possible but i don't know how to make script it work > <"

  3. 2 hours ago, Hergel said:

    I understand that displaying the current online status can be extremely helpful. However, it’s possible that you might be looking in the wrong place. Perhaps you could try the following suggestion:

    /src/login/loginclif.cpp
    method logclif_auth_ok

    find this :
     

    		WFIFOW(fd,header+n*size+4) = ntows(htons(ch_server[i].port)); // [!] LE byte order here [!]
    		memcpy(WFIFOP(fd,header+n*size+6), ch_server[i].name, 20);
    		WFIFOW(fd,header+n*size+26) = login_get_usercount( ch_server[i].users );

     



    replace for:

    		WFIFOW(fd,header+n*size+4) = ntows(htons(ch_server[i].port)); // [!] LE byte order here [!]
    		
    		// Concatenate the server name with the online user count [Hergel]
    		char buffer[20];
    		int users = ch_server[i].users;
    		snprintf(buffer, 20, "%s (%d)", ch_server[i].name, users);
    		memcpy(WFIFOP(fd, header+n*size+6), buffer, 20);
    
    		WFIFOW(fd,header+n*size+26) = login_get_usercount( ch_server[i].users );

     

    OMG! and I thought I already lost hope, Thank you so much for finding it and clarify to me, it help me so much ^ ^

    It worked now, like a Magic! I'm so appreciated your support!!!

  4. due to Ragexe Client now no longer show Player Online Count, and I don't know which server or client that i should fix

    If anyone know how to mod the client to show the Player Online Count after server name, I'm appreciate it.

     

    But if it have to do with the source, right now i'm at here

    src/char/char_logif.cpp

    around the line 777

    I change from

        //memcpy(WFIFOP(login_fd,60), charserv_config.server_name, 20);

        Sql_Query(sql_handle, "SELECT count(`char_id`) FROM `char` WHERE `online`>0");

        char result[50];
        sprintf(result, "%s(%d)", charserv_config.server_name, sql_handle);
        memcpy(WFIFOP(login_fd,60), result, 20);

    But it won't work and I don't know how to make it happend , can anyone help me please?

  5. On 10/13/2023 at 5:15 AM, Takuyakii said:

    //mag_dun01
    mag_dun01.gat,0,0,0,0    monster    Explosion    1383,10,0,0,0
    mag_dun01.gat,0,0,0,0    monster    Blazer    1367,10,0,0,0
    mag_dun01.gat,0,0,0,0    monster    Diabolic    1382,10,0,0,0
    mag_dun01.gat,0,0,0,0    monster    Grizzly    1381,5,0,0,0
    mag_dun01.gat,0,0,0,0    monster    Lava Golem    1366,3,0,0,0
    mag_dun01.gat,0,0,0,0    monster    Kaho    1072,10,0,0,0

    //mag_dun02 
    mag_dun02.gat,0,0,0,0    monster    Gig    1387,10,0,0,0
    mag_dun02.gat,0,0,0,0    monster    Blazer    1367,10,0,0,0
    mag_dun02.gat,0,0,0,0    monster    Diabolic    1382,10,0,0,0
    mag_dun02.gat,0,0,0,0    monster    Nightmare Terror    1379,3,0,0,0
    mag_dun02.gat,0,0,0,0    monster    Sky Deleter    1384,5,0,0,0
    mag_dun02.gat,0,0,0,0    monster    Earth Deleter    1385,5,0,0,0
    mag_dun02.gat,0,0,0,0    monster    Kaho    1072,10,0,0,0

    Thank you, but I mean mag_dun just an example, I want all the maps

    Like prt_fild moc_fild pay_dun all

    I mean an entire mobs folder fields/dungeons

    still waiting someone who can help ^-^

  6. I try to find accurate source, right now i already have Mobs for 5.0 (before 6.0)

    and i try to compare it to the old book and i found out the Monster type on each maps are all accurated

    but what I'm not sure is Monster amount, I mean i got the mob spawn for eathena 5.0 (from thailand)

    some source i look inside the mob spawn folder and found out that on a different source there are not equal amount of mob spawn

    some map have amount of monster more than reality

    like what i found out

    Magma dungeon

    Quote

    //==================================================
    // mag_dun01 - Nogg Road F1 (Completed!) (77)
    //==================================================

    mag_dun01,0,0    monster    Kaho    1072,20 // = 6.0+
    mag_dun01,0,0    monster    Lava Golem    1366,15
    mag_dun01,0,0    monster    Blazer    1367,10
    mag_dun01,0,0    monster    Grizzly    1381,10
    mag_dun01,0,0    monster    Diabolic    1382,10
    mag_dun01,0,0    monster    Explosion    1383,12

    //mag_dun01,0,0    monster    Kaho    1072,30
    //mag_dun01,0,0    monster    Lava Golem    1366,33
    //mag_dun01,0,0    monster    Blazer        1367,50
    //mag_dun01,0,0    monster    Grizzly        1381,45
    //mag_dun01,0,0    monster    Diabolic        1382,40
    //mag_dun01,0,0    monster    Explosion    1383,50

    //==================================================
    // mag_dun02 - Nogg Road F2 (Completed!) (81)
    //==================================================

    mag_dun02,0,0    monster    Blazer        1367,15
    mag_dun02,0,0    monster    Nightmare Terror    1379,12
    mag_dun02,0,0    monster    Diabolic        1382,12
    mag_dun02,0,0    monster    Gig            1387,18
    mag_dun02,0,0    monster    Deleter        1384,12
    mag_dun02,0,0    monster    Deleter        1385,12

    //mag_dun02,0,0    monster    Kaho    1072,40
    //mag_dun02,0,0    monster    Blazer        1367,60
    //mag_dun02,0,0    monster    Nightmare Terror    1379,43
    //mag_dun02,0,0    monster    Diabolic        1382,60
    //mag_dun02,0,0    monster    Gig            1387,60
    //mag_dun02,0,0    monster    Deleter        1384,35
    //mag_dun02,0,0    monster    Deleter        1385,35

    I found out that Kaho is put inside mag dungeon after 5.0 , but I have to put it in ro 5.0 too, otherwise you can't find Kaho anywhere

    but the point is this

    Quote

    //mag_dun01,0,0    monster    Lava Golem    1366,33
    //mag_dun01,0,0    monster    Blazer        1367,50
    //mag_dun01,0,0    monster    Grizzly        1381,45
    //mag_dun01,0,0    monster    Diabolic        1382,40
    //mag_dun01,0,0    monster    Explosion    1383,50

    Source that i found it's Lava golem 33 Blazer 50 etc.

    But when i go test in the map monster is far too much to be real and i have the old book and i compare it to the book info from the book it said amount lower

    87235_0.thumb.jpg.5af6edecb4a62f1029219fd65e7696df.jpg

    87236_0.thumb.jpg.c7a57e097c660001d4dfd9e53d10e2b5.jpg

  7. Docs Script_commands.txt

     

    ** Define a shop/cashshop/itemshop/pointshop NPC.

    -%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>{,discount},<itemid>:<price>{,<itemid>:<price>...}
    <map name>,<x>,<y>,<facing>%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>{,discount},<itemid>:<price>{,<itemid>:<price>...}

    -%TAB%cashshop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}
    <map name>,<x>,<y>,<facing>%TAB%cashshop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}

    -%TAB%itemshop%TAB%<NPC Name>%TAB%<sprite id>,<costitemid>{:<discount>},<itemid>:<price>{,<itemid>:<price>...}
    <map name>,<x>,<y>,<facing>%TAB%itemshop%TAB%<NPC Name>%TAB%<sprite id>,<costitemid>{:<discount>},<itemid>:<price>{,<itemid>:<price>...}

    -%TAB%pointshop%TAB%<NPC Name>%TAB%<sprite id>,<costvariable>{:<discount>},<itemid>:<price>{,<itemid>:<price>...}
    <map name>,<x>,<y>,<facing>%TAB%pointshop%TAB%<NPC Name>%TAB%<sprite id>,<costvariable>{:<discount>},<itemid>:<price>{,<itemid>:<price>...}

    <map name>,<x>,<y>,<facing>%TAB%marketshop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>:<stock>{,<itemid>:<price>:<stock>...}

     

     

    Well I think everything are right, but it's all become apple even the example script from rathena

  8. I open

    1. rathena
    2. /npc
    3. /merchants
    /

    cash_trader.txt

     

    payon,171,142,4    cashshop    Kafra Shop Employee    116,12900:1000,12901:200,12902:1000,12909:100,12910:100,12911:1500,12922:150,7619:100,7620:100,12916:150,12917:150,12915:100,12918:100,12913:125,12914:125,13553:50,12903:100,12904:100,12905:100,12906:100,12907:100,12908:100,7776:50

     

    But it's show only 1st item after that all become apple with big number

    screenrAthena000.thumb.jpg.33ad33346bc1331132dd10c2fbc1b23b.jpg

     

    screenrAthena001.thumb.jpg.5a379b421e7fd78373d2f94852d1faa4.jpg

  9. I try script below every on loadevent work except OnPCLoadMapEvent

     

    -    script    OnPCEvents    -1,{


    OnPCLoadMapEvent:
        announce "OnPCLoadMapEvent",bc_all,0xFFFF00;
        end;

    OnPCBaseLvUpEvent:
        announce "OnPCBaseLvUpEvent",bc_all,0xFFFF00;
        end;

    OnPCJobLvUpEvent:
        announce "OnPCJobLvUpEvent",bc_all,0xFFFF00;
        end;

    OnPCKillEvent:
        announce "OnPCKillEvent",bc_all,0xFFFF00;
        end;

    OnNPCKillEvent:
        announce "OnNPCKillEvent",bc_all,0xFFFF00;
        end;

    OnPCDieEvent:
        sc_end sc_all;

        announce "OnPCDieEvent",bc_all,0xFFFF00;

        end;

    OnPCLoginEvent:
        announce "OnPCLogin",bc_all,0xFFFF00;

        end;

    OnPCLogoutEvent:
        atcommand "@monster poring 1 "+strcharinfo(0);

        end;
    }

     

  10. I want to max 2 instance of each map and when I do I got message

    [Error]: (mapindex_add) Map index (2000) for "lhz_dun04-" out of range (max is 2000)

    I already check in the common\mmo.hp

    it's said MAX_MAP_PER_SERVER 1500

    while it actually 2000

     and i change it to 3000

    and recompile but nothing happend

    Can anyone give me some help to increase mapindex_add range?

  11. I don't know how to explain, let me says some example

    there 2 account

    account 1 have 3 characters

    1.Alexandrite
    2.Alexandria
    3.AlexanZero

    and account 2 have 1 characters

    1.Altima

    So basically Altima knowing Alexandrite

    but today Alexandrite is playing character Alexandria

    So if Altima whisper to Alexandrite

    normally it would says Alexandrite is not Online

    But I want it to redirect to Alexandria automatically

    Or Another word no matter account 1 play on any Character

    Altima can type any name on 3 name above

    if he's online they will redirect whisper message to that character of that account?

    I'm not sure if anyone understand it

     

    and yeah... if possible I would like when Register as a Friends is equally register as account instead of just Name

    example again like

    if Altima add friend with Alexandrite

    when Altima open Friend list

    Altima should see

    AlexanZero (account1)

     

    Altima now know Alexandrite playing on AlexanZero and know that AlexanZero ID is account 1 too

×
×
  • Create New...