Jump to content

Foob

Members
  • Posts

    267
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Foob

  1. Hi,

    Does anyone have a copy of old version of externalsettings.lua that work with the current PR of Adventurer Agency?

    Web service for fines normally for me including uploading and updating emblem and other functions. Only the party booking doesn't work.

    For reference, I use client 2020-03-04RagexeRE. So maybe someone has kept an archive of old lua files including externalsettings for it.

  2. Try this (Reference Bootstrap)

    <div class="modal" id="testModal" tabindex="-1" role="dialog">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title">Modal title</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">×</span>
            </button>
          </div>
          <div class="modal-body">
            <p><?php echo htmlspecialchars($message) ?></p>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
            <button type="button" class="btn btn-primary">Save changes</button>
          </div>
        </div>
      </div>
    </div>

    on header.php

    		<?php if ($message=$session->getMessage()): ?>
    			<script type="text/javascript">
    				$(document).ready(function(){
    					$("#testModal").delay(2000).modal('show');
    				});
    			</script>		
    		<?php endif ?>

    The message will appear 2seconds after the document is ready.

  3. 22 hours ago, L1nkZ said:

    Hi,

     

    Well you should rather do

    
    <a href="https://www.google.com/" target="_blank">Click Me</a>

    But apart from that, it should work: an internet explorer window should open with a tab displaying https://www.google.com

    Tried the the same, it only opens the same window with the patcher. Doesn't open a new internet explorer.

    I only have edge, does this matter? How to make it open a default browser?

  4. On 5/2/2021 at 11:51 AM, Chaos92 said:

    You can set your php timezone in php.ini file in your web hosting.

    date.timezone = "Asia/Singapore"

    If VPS, you can try follow this : https://hostingmalaya.com/cara-menukar-timezone-vps-atau-server-linux.

    I have did this already via php.ini and or via .htaccess setting date.timezone it still doesn't work.

    When V4P checks the time it still uses VPS Shared Hosting date which is in UTC. And to add, I cannot change the time of it since its a shared hosting.

    Fixed. Need to update SQL timezone.

  5. Hi,

    I'm having a difficulty setting the correct time for the vote for points and fluxcp. I have currently configured this application.php

    'DateDefaultTimezone'		=> 'Asia/Singapore',

    However, my web-host server (shared hosting) is currently in UTC.

    The problem is that whenever I use VoteForPoints in the logs (database) it shows correct time (GMT+8 format).

    However, when the time already passed (timestamp_expire) is greater than the Singapore time I still can't vote. (Normally you should be able to vote).

    I found the problem where the shared hosting time which is in UTC is being used by the VPS.

    So if I set the interval for every vote to 8 hours, it will automatically add additional 8 hours since UTC is 00:00 while SGT is +08:00.

    What I already did:

    • Force timezone via PHP Configuration to Asia/Singapore
      - via SO answer
    • In application.php its also Asia/Singapore
      - Fluxcp default timezone config

    I've tried to google it but can't find any or I'm misreading something.

    P.S. I asked here in 3rd party support since the V4P is not a default flux function. If I'm wrong kindly move to proper forum.

  6. I have this problem when select menu has many entry such as 50+ menu.

    e.g.

    setarray .@menu_list[0],1,2,3,4,5,6,up-to,100;
    .@size = getarraysize(.@menu_list);
    for( .@i = 0; .@i < .@size; .@i++ ) and so on..

    In-game it will only appear up-to 50 and other will not show.

    Is there a way to paginate select lets say for example per page is 30 menu then next is 30?

  7. I have this bonus script.

    .@r = getrefine();
    bonus bMdef,15;
    bonus bDelayrate,-10+(getskilllv("SU_NYANGGRASS")>4?-20:0);
    bonus2 bMagicAddClass,Class_Boss,getskilllv("SU_MEOWMEOW")>4?25:0;
    bonus2 bSkillAtk,"SU_CN_METEOR",.@r>8?50:(.@r>6?25:10);
    bonus2 bSkillAtk,"SU_SV_STEMSPEAR",.@r>8?50:(.@r>6?25:10);
    bonus2 bVariableCastrate,"SU_STOOP",.@r>8?-100:(.@r>6?-50:0);
    bonus2 bVariableCastrate,"SU_LOPE",.@r>8?-100:(.@r>6?-50:0);
    if(.@r >=10 ){
    	autobonus " bonus bUseSPrate,-100; ",10,20000,BF_MAGIC|BF_SKILL;
    }
    bonus bHPGainValue,.@r*30;
    bonus bLongHPGainValue,.@r*30;
    bonus bMagicHPGainValue,.@r*30;
    bonus bSPGainValue,.@r*3;
    bonus bLongSPGainValue,.@r*3;
    bonus bMagicSPGainValue,.@r*3;
    if(getskilllv("SU_SPIRITOFLAND")>=1){
    	bonus2 bVariableCastrate,"SU_CN_METEOR",-4*(getskilllv("SU_CN_METEOR")+getskilllv("SU_SV_STEMSPEAR")+getskilllv("SU_NYANGGRASS")+getskilllv("SU_CN_POWDERING")+getskilllv("SU_SV_ROOTTWIST"));
    	bonus2 bVariableCastrate,"SU_SV_STEMSPEAR",-4*(getskilllv("SU_CN_METEOR")+getskilllv("SU_SV_STEMSPEAR")+getskilllv("SU_NYANGGRASS")+getskilllv("SU_CN_POWDERING")+getskilllv("SU_SV_ROOTTWIST"));
    }

    And results an error below.

    image.png.f6364859fec36bf7be37abc9515ec78c.png

    However, if I use the same script removing one line of

    	bonus2 bVariableCastrate,"SU_SV_STEMSPEAR",-4*(getskilllv("SU_CN_METEOR")+getskilllv("SU_SV_STEMSPEAR")+getskilllv("SU_NYANGGRASS")+getskilllv("SU_CN_POWDERING")+getskilllv("SU_SV_ROOTTWIST"));

    it works perfectly. What am I missing on the bonus? So the error only shows if I use 2 "bonus2 bVariableCastrate,sk,n;"

  8. @HaARiZz you are unable to find it in git right now since its closed already and has been pushed to master branch. However some of the updates that are from 16th anniversary onwards are available in PR such as update/rune_knight and etc. You just have to merge it with your current branch.

    • Upvote 1
  9. Hello,

    I'm trying to edit clif_broadcast function from clif.cpp to work with player who has var like example below.

    void clif_broadcast(struct block_list* bl, const char* mes, int len, int type, enum send_target target)
    {
    	nullpo_retv(mes);
    	if (len < 2)
    		return;
    
    	int lp = (type&BC_COLOR_MASK) ? 4 : 0;
    	std::unique_ptr<unsigned char> buf(new unsigned char[4+lp+len]);
    
    	WBUFW(buf.get(),0) = 0x9a;
    	WBUFW(buf.get(),2) = 4 + lp + len;
    	if (type&BC_BLUE)
    		WBUFL(buf.get(),4) = 0x65756c62; //If there's "blue" at the beginning of the message, game client will display it in blue instead of yellow.
    	else if (type&BC_WOE)
    		WBUFL(buf.get(),4) = 0x73737373; //If there's "ssss", game client will recognize message as 'WoE broadcast'.
    	memcpy(WBUFP(buf.get(), 4 + lp), mes, len);
    	
    	struct map_session_data* sd;
    	nullpo_retv(sd);
    	int counter = static_cast<int>(pc_readreg2( sd, MY_VAR ));
    	
    	if(counter < 1)
    		clif_send(buf.get(), WBUFW(buf.get(),2), bl, target);
    }

    When I compile, there's a problem where it says: "uninitialized local variable 'sd' used"

    The server will start but come broadcast it will crash and will point out to the line. What am I missing? Is this possible?   

×
×
  • Create New...