Jump to content

imat1

Members
  • Posts

    102
  • Joined

  • Days Won

    6

Posts posted by imat1

  1. Update: Working on the latest rathena version as of the date I'm typing this.

    // SERVER SIDE
    1. Open src/map/status.cpp
    find and add after case SC_JEXPBOOST:

    		case SC_EXPBOOST:
    		case SC_JEXPBOOST:
    		case SC_VIPSTATE: // VIP Status Icon
    		case SC_PERIOD_RECEIVEITEM_2ND:
    		case SC_PERIOD_PLUSEXP_2ND:

    2. Open src/map/status.hpp
    find and add before SC_MAX,

    	SC_OVERCOMING_CRISIS,
    
    	SC_VIPSTATE = 2000, // VIP Status Icon
    	SC_MAX, //Automatically updated max, used in for's to check we are within bounds.

    find and add before EFST_MAX,

    /// Do not modify code above this, since it will be automatically generated by the API again
    	EFST_VIPSTATE = 2000, // VIP Status Icon
    	EFST_MAX,

    3. Open src/map/script_constants.hpp
    find and add after export_constant(SC_OVERCOMING_CRISIS);

    	export_constant(SC_CONTENTS_20);
    	export_constant(SC_OVERCOMING_CRISIS);
    	export_constant(SC_VIPSTATE); // VIP Status Icon
    
    /// Do not modify code below this, until the end of the API hook, since it will be automatically generated again

    find and add after export_constant(EFST_C_BUFF_9);

    	export_constant(EFST_C_BUFF_9);
    	export_constant(EFST_VIPSTATE); // VIP Status Icon
    
    /// @APIHOOK_END

    4. Open db/import/status.yml
    copy and paste (your status.yml should look like this if you haven't added any custom sc_status)

    Header:
      Type: STATUS_DB
      Version: 4
    
    Body:
      - Status: Vipstate
        Icon: EFST_VIPSTATE
        Flags:
          NoRemoveOnDead: true
          NoDispell: true
          NoBanishingBuster: true
          NoClearance: true

    5. Open db/import/item_db.yml or db/pre-re/item_db_usable.yml (up to you)

      - Id: 30000
        AegisName: Vip_Card_3D
        Name: VIP Card 3D
        Type: Cash
        Buy: 20
        Weight: 10
        Trade:
          NoDrop: true
          NoSell: true
          NoGuildStorage: true
          NoMail: true
          NoAuction: true
        Script: |
          if (vip_status(VIP_STATUS_ACTIVE)) {
             dispbottom "You have extended your VIP duration.";
          } else {
             dispbottom "You have successfully become a VIP member.";
             sc_start SC_VIPSTATE,-1,1;
          }
          vip_time 4320;
      - Id: 30001
        AegisName: Vip_Card_7D
        Name: VIP Card 7D
        Type: Cash
        Buy: 20
        Weight: 10
        Trade:
          NoDrop: true
          NoSell: true
          NoGuildStorage: true
          NoMail: true
          NoAuction: true
        Script: |
          if (vip_status(VIP_STATUS_ACTIVE)) {
             dispbottom "You have extended your VIP duration.";
          } else {
             dispbottom "You have successfully become a VIP member.";
             sc_start SC_VIPSTATE,-1,1;
          }
          vip_time 10080;
      - Id: 30002
        AegisName: Vip_Card_30D
        Name: VIP Card 30D
        Type: Cash
        Buy: 20
        Weight: 10
        Trade:
          NoDrop: true
          NoSell: true
          NoGuildStorage: true
          NoMail: true
          NoAuction: true
        Script: |
          if (vip_status(VIP_STATUS_ACTIVE)) {
             dispbottom "You have extended your VIP duration.";
          } else {
             dispbottom "You have successfully become a VIP member.";
             sc_start SC_VIPSTATE,-1,1;
          }
          vip_time 43200;

    6. Open npc/custom and add a text file named vip_system.txt
    copy and paste

    -	script	VIP_TIME	-1,{
    OnPCLoginEvent:
    	if (vip_status(1)) {
    		.@remain = vip_status(VIP_STATUS_REMAINING); // seconds
    
    		dispbottom "Remaining VIP duration: " + Time2Str(vip_status(VIP_STATUS_REMAINING) + gettimetick(2));
    		sc_start SC_VIPSTATE, .@remain * 1000, 1;
    		end;
    	}
    
    OnPCLogoutEvent:
    	if (vip_status(1)) {
    		sc_end SC_VIPSTATE; // remove the buff to update the timer on login
    	}
    	end;
    }

    7. Open npc/scripts_custom.conf
    add to the last line

    npc: npc/custom/vip_system.txt

    8. Recompile your server

     

    // CLIENT SIDE
    1. You need four files from your RO GRF. Locate and extract them first from luafiles514/lua files/stateicon/

    efstids.lub
    stateiconimginfo.lub
    stateiconinfo.lub
    stateiconinfo_f.lub // I'm not sure if this one is necessary but I decided to include it anyway xD

    2. Edit efstids.lub
    Scroll down last line and add.

    	EFST_VIPSTATE = 2000,

    3. Edit stateiconimginfo.lub
    Scroll down last line and add. Edit to your liking.

    StateIconList[EFST_IDs.EFST_VIPSTATE] = {
    	haveTimeLimit = 1,
    	posTimeLimitStr = 2,
    	descript = {
    		{ "VIP", COLOR_TITLE_BUFF },
    		{ "%s", COLOR_TIME },
    		{ "Base EXP Rate +50%" },
    		{ "Job EXP Rate +50%" },
    		{ "Drop Rate +50%" },
    		{ "Additional 300 Storage Slot" },
    		{ "Ignore gemstone requirement for skills" },
    		{ "Max character limit increase" },
    		{ "Auto Attack Feature" },
    	}
    }

    4. Edit stateiconinfo.lub
    Scroll down last line and add.

    		[EFST_IDs.EFST_VIPSTATE] = "vipicon.tga",

    5. Edit stateiconinfo_f.lub
    Scroll down last line and add.

    	EFST_IDs.EFST_VIPSTATE,

    Done! Congratulations!

     

    Free VIP Icon from here. Put it inside your grf - data\texture\effect

    Note: The timer on the VIP status icon will not be displayed if the duration exceeds 24 days and 19 hours. Unfortunately, I don't know how to make this possible either.

    • Upvote 1
  2. Show me your item script of it. I might be able to help you.

    On 12/23/2023 at 9:53 AM, GM Winter said:

    when lord knight equip it it changes to rune knight but still the peco peco is missing even its already riding it

        Script: |
          changebase roclass(eaclass()|EAJL_THIRD);
          if(Class == Job_Lord_Knight) {
             if(checkriding()) {
                setoption OPTION_DRAGON1;
             }
          }
        UnEquipScript: |
          changebase Class;
          if(Class == Job_Lord_Knight) {
             if(checkdragon()) {
                setriding;
             }
          }

  3. 13 hours ago, Yukaiii said:

    Guys, could anyone help me with how to fix my custom box?

    every time I try to open the box I get this error and I get nothing.

    Item script of your custom box should be:

     callfunc "F_EventBox";

    and add this in your npc/custom folder

    function	script	F_EventBox	{
    
    	// change Item ID here
    	setarray .@i1[0],607,608; // Common Items 
    	setarray .@i2[0],512,513; // Rare Items
    	setarray .@i3[0],514,515; // Super Rare Items
    
    	set .@i1rand,rand( getarraysize(.@i1) ); // Randomize Common Items; just change max amount if you add items
    	set .@i2rand,rand( getarraysize(.@i2) ); // Randomize Rare Items; just change max amount if you add items
    	set .@i3rand,rand( getarraysize(.@i3) ); //Randomize Super Rare Items; just change max amount if you add items
    
    	.@chance = rand(100);
    
    	// Super Rare Item 1%
    	if (.@chance == 1) {
    		getitem .@i3[.@i3rand],1;
    		announce "[ "+strcharinfo(0)+" ] won a [ "+getitemname(.@i3[.@i3rand])+" ] from the Event Box.",0;
    	}
    	else if (.@chance <= 10) { // 10%
    		getitem .@i2[.@i2rand],1;
    	}
    	
    	// Common Items
    	else {
    		getitem .@i1[.@i1rand],1;
    	}
    	end;
    }

     

  4. 5 hours ago, Dolphin86 said:
    { "veil", 120, 116, 4, IT_SIGNBOARD, "item\\suffragium.bmp", "  Warper", "#0x00FFFFFF" }

    Change 4 to 6 or maybe higher for the signboard not to overlap with your NPCs sprite. Adjust to your liking.

    • Upvote 1
  5. 47 minutes ago, joyy95 said:

    where to edit this annoucement? for example i want edit the annoucement only ~ 

    • example edit>>>>>>>>>>> ** Player1 just get MVP card Kiel Card (chance 0.05%) ***
    This i already enable
    
    • // Make broadcast ** Player1 won Pupa's Pupa Card (chance 0.01%) ***
    • // This can be set to any value between 0~10000.
    • // Note: It also announces STEAL skill usage with rare items
    • // 0 = don't show announces at all
    • // 1 = show announces for 0.01% drop chance items
    • // 333 = show announces for 3.33% or lower drop chance items
    • // 10000 = show announces for all items rare_drop_announce: 5

    https://github.com/rathena/rathena/blob/5b2f4e63a7b894c5438052f9fabef4885c4b6bbc/conf/msg_conf/map_msg.conf#L558

  6. 8 hours ago, friomixx said:

    Hi,

    Can anyone help me, how should i patch my client?
    when i'm trying to view Euphy's Quest Shop, it is getting displayed like this.

    image.png.d8d85cf14ba46115cd85866bc48eb852.png

     

    However, when using 2019-06-05 (i dont diff this client, i just downloaded it somewhere here in rathena but i can't remember the exact post) , i dont have any issue as showed below.

    image.png.3d45870613a9ee46ccf1ae58e605e41d.png

    Below are the patches i've selected for 2021-11-03 using Nemo.
     

    8 Custom Window Title
    9 Disable 1rag1 type parameters (Recommended)
    13 Disable Ragexe Filename Check (Recommended)
    14 Disable Hallucination Wavy Screen (Recommended)
    18 Skip Service Selection Screen
    23 Enable /who command (Recommended)
    24 Fix Camera Angles (Recommended)
    34 Enable /showname (Recommended)
    35 Read Data Folder First
    36 Always read msgstringtable.txt (Recommended)
    38 Remove Gravity Ads (Recommended)
    39 Remove Gravity Logo (Recommended)
    41 Disable Nagle Algorithm (Recommended)
    44 Translate Client (Recommended)
    46 Use Normal Guild Brackets (Recommended)
    47 Use Ragnarok Icon
    48 Use Plain Text Descriptions (Recommended)
    49 Enable Multiple GRFs (Recommended)
    50 Skip License Screen
    64 @ Bug Fix (Recommended)
    65 Load Custom lua file instead of iteminfo*.lub (Recommended)
    71 Ignore Resource Errors
    73 Remove Hourly Announce (Recommended)
    84 Remove Serial Display (Recommended)
    90 Enable DNS Support (Recommended)
    208 Restore Cash Shop Icon
    213 Disable Help Message on Login (Recommended)
    230 Always load Korea ExternalSettings lua file (Recommended)
    231 Remove hardcoded address/port (Recommended)
    232 Restore old login packet (Recommended)
    234 Ignore Lua Errors
    270 Change AchievementList*.lub path
    271 Change MonsterSizeEffect*.lub path
    272 Change Towninfo*.lub path
    273 Change PetEvolutionCln*.lub path
    274 Change Tipbox*.lub path
    275 Change CheckAttendance*.lub path
    276 Change OngoingQuestInfoList*.lub path
    277 Change RecommendedQuestInfoList*.lub path
    278 Change PrivateAirplane*.lub path
    290 Hide build info in client (Recommended)
    291 Hide packets from peek (Recommended)
    307 Hide attendance button
    308 Hide adventurer agency button
    313 Change MapInfo*.lub path
    326 Disable OTP Login Packet (Recommended)
    338 Additional client validation (Recommended)
    348 Send client flags to server (Recommended)
    403 Ignore most errors
    404 Use borderless mode in full screen (Recommended)
    409 Add close button to game window
    418 Hide reputation button
    427 Check is servertype in xml file was set to correct value (Recommended)
    429 Protect shorten and bold name flags

     

    That's because of white space.

    Try changing every

    mes " >

    to

    mes ">

  7. On 9/29/2023 at 6:11 PM, G-RO said:

    Hello 

    Is bonus bonus bVariableCastrate,-30; o can be placed on Potion? 

    for example when a potion is used it will last up to 30 minutes then the effect will be gone.

     

    Please help/guide how to it? 😄

    I think you need to create a custom status change for it.

     

    Or try this on your potion script.

    bonus_script "{ bonus bVariableCastrate,-30; }",1800;

  8. 35 minutes ago, Echoes said:

    I'm using localhost IP for the server so I used localhost on assistaddr too but that isn't it then? Also used IPv4 and didn't work, should I use my public IP?

    i can't change emblem for some reason yeah, thought i just needed the emblem folder on ro directory

    Did you run web-server.exe together with map, login and char server?

  9. 9 hours ago, jamesandrew said:

     

     
    All skills in Etc are not automatically updated from skill tree and hotkey. @refresh and @warp didn't remove the skills either. I had to relog back to character selection to completely removed them.
    It's way more annoying when I get attacked by a lot of different skills as a rogue.


    Is there a way to fix this?
    Thanks

    https://github.com/rathena/rathena/pull/7939

    Also I recommend you to join rathena's discord channel. You'll meet a lot of cool people there.

×
×
  • Create New...