Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/29/24 in Posts

  1. Bards and dancers can use the "Compose" skill to play melody for everyone around them, and in addition a donation box is placed next to them, where other passing players can give zeny's to encourage the street musician to continue his work and feed your family! Musicians cannot open a songwriting area in the same view as each other, so it's your chance to grab the best spot to perform your musics!
    1 point
  2. Here's my own version of an Hourly Point System Simple and easy to configure Makes use of Account Variable to track time Records player's playtime every 5 minutes, allowing continuous tracking even if they log off in between* Provides detailed time when they last received their reward/bonus/hourly point Removes Vendors from the system automatically No support will be provided, unless it's a bug issue. /* Author: Nyani Version 1.0 ---------------------------------------------- Playtime System ---------------------------------------------- Changelogs 1.0 - Initial Release */ - script PlaytimeCount -1,{ end; OnPCLoginEvent: //if(BaseLevel < 30) end; @starttime$ = gettimestr("%Y-%m-%d %H:%M:%S", 21); message strcharinfo(0),"Playtime Point System is now enabled. Please note that vending will disqualify you from gaining points."; addtimer 300000,"PlaytimeCount::OnPointUpdate"; // 5 minutes dispbottom "Play Point System start time: "+@starttime$; dispbottom "[ "+#playtimepts+"0/60 ] minutes completed."; end; OnPointUpdate: if ( checkvending(strcharinfo(0)) == 2 ){ dispbottom "You have been removed from the Playtime Point System. Please re-log to opt-in again."; deltimer strnpcinfo(3)+"::OnPointUpdate"; end; } @playtime += 1; if(@playtime == 2){ @playtime = 0; #playtimepts += 1; if(#playtimepts == 6){ #playtimepts = 0; #YourPtsHere += 1; @playtime = 0; message strcharinfo(0),"[Playtime Points]: You have received your Playtime Reward at "+gettimestr("%Y-%m-%d %H:%M:%S", 21)+"."; @prevtime$ = gettimestr("%Y-%m-%d %H:%M:%S", 21); } } deltimer "PlaytimeCount::OnPointUpdate"; addtimer 300000,"PlaytimeCount::OnPointUpdate"; end; OnPlaytimeCheck: dispbottom "Last Reward: "+@prevtime$; dispbottom "Minutes: "+#playtimepts+"0/60"; dispbottom "Current points: "+#YourPtsHere; end; OnInit: bindatcmd "playtime",strnpcinfo(0)+"::OnPlaytimeCheck"; end; }
    1 point
  3. Basically is a script that, when the player creates a new character and login for the first time shows a box to select the rates (low, mid or high). Need to be changed ONLY for the player that selected that rate, no for the whole server (that was the only way I could do it). And the message don't show more when the player login in the char, ONLY for the first time.. Can someone help, please?
    1 point
  4. Try this - script SelectRate -1,{ OnPCLoginEvent: if(!server_preferred_rate){ mes "Select Your Preferred Server Rates"; switch(select("High Rate:Mid Rate:Low Rate")){ case 1: mes "Thank you for choosing!"; set server_preferred_rate,1; close; case 2: mes "Thank you for Choosing!"; set server_preferred_rate,2; close; case 3: mes "Thank you for Choosing!"; set server_preferred_rate,3; close default: mes "Please relogin to choose!"; close; } } OnShowStatistics: query_sql("SELECT COUNT(*) FROM char_reg_num WHERE `key` = 'server_preferred_rate' AND `value` = 1",.@highratecount); query_sql("SELECT COUNT(*) FROM char_reg_num WHERE `key` = 'server_preferred_rate' AND `value` = 2",.@midratecount); query_sql("SELECT COUNT(*) FROM char_reg_num WHERE `key` = 'server_preferred_rate' AND `value` = 3",.@lowratecount); mes "This is the current statistics"; mes "High Rate Count : ("+.@highratecount+")"; mes "Mid Rate : ("+.@midratecount+")"; mes "Low Rate : ("+.@lowratecount+")"; close; OnInit: bindatcmd("showstatistics",strnpcinfo(3)+"::OnShowStatistics",99,99); end; }
    1 point
  5. I suppose your offline server is still using PHP below version 8 (like 7.4 which is EOL since Nov 2022), while your online server is already using PHP 8. The problem is, #[0] (or generally #[identifier]) is considered an attribute since PHP 8, that is located at an invalid position, therefore resulting in a parse error. In older versions of PHP # was basically the same as // and just started a single-line comment (which it is supposed to be in your file as well). An easy fix is to just mass replace all occurances of #[ with # [ (add a space between) or replace with slash style comments (//[).
    1 point
×
×
  • Create New...