-
Posts
163 -
Joined
-
Last visited
-
Days Won
8
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Hyroshima
-
-
hello everyone, would anyone know how to tell me the simplest way to access a permanent char variable that i created in a player but by src?
-
I did this example
prontera,161,185,5 script NPCTIMED 112,{ if(#TalkTimer > gettimetick(2)) { mes "You have to wait!"; close; } else { for(set .@i,0; .@i<getarraysize($Talkip$); set .@i,.@i+1) { if($Talkip$[.@i] == getcharip()){ deletearray $Talkip$[.@i],1; set .@i,getarraysize($Talkip$); } } } mes "Hi..."; mes "save teste?"; if(select("Yes:Not")==2){ close; } mes "Ok, ready"; set #TalkTimer,gettimetick(2)+(60*60*5); setarray $Talkip$[(getarraysize($Talkip$) ? getarraysize($Talkip$):0)],getcharip(); close; }
-
14 hours ago, Emistry said:
#1
OnSecXX:
doesn't exist, but this is redundant and unnecessary because OnMinuteXX already can fulfill what you looking for.
#2
while(1) { // process what you want sleep 1000; }
this attempt aren't actually recommended, people has been abusing how to use this trick for their convenience, without knowing the consequences.
Whenever the script has done what its instructed to do, it should free up the resource, but this attempts doesn't free up the resource.
#3
OnMinuteXX:
due to user required to duplicate from 00 ~ 59th minutes, its become redundant work, but its exactly what you need. Fyi, it free up the resource once it done its part.
#4
OnTimer60000: // process whatever you want here. OnInit: initnpctimer; end;
more elegant, and less redundant work, doesn't required user to duplicate all the OnMinuteXX like attempt #3 did, and yes it also free up the resources once it done its part.
Conclusion: you should pick between attempt #3 and #4. Personally, I would prefer #4.
Thanks for attention, but my idea is not to leave a time attachment, and work only when called similar to other labels that have a trigger that in this case it would always have been an increase in the minute real time.
I will analyze and check how it would behave and try to create this function ^^.
#Conclusion: you should pick between attempt #3 and #4. Personally, I would prefer #4.
*this would also be the one I would use ^^ -
I haven't tested it, but I hope it's the way you asked.
you define the cooldown in:set .@cooldown,60; //time in minute
the changes I made for you to understand
~1 before if ( strcharinfo(3) == strnpcinfo(4)) .@online++; ~ afeter if ( strcharinfo(3) == strnpcinfo(4) && RoomCD < gettimetick(2)) .@online++; else set .@CDnicks$,.@CDnicks$+strcharinfo(0)+", "; ~2 before else if ( .party_id ) { mes "[MvP Ladder Warper]"; mes "I'm sorry, but a party is currently playing the game. Please standby until the party is finished."; mes "Thank you."; close; } ~ afeter else if ( .@CDnicks$ != "" ) { mes "[MvP Ladder Warper]"; mes "There are players in your group with active cooldown!"; mes "^FF0000"+.@CDnicks$+"^000000"; close; } ~3 before Zeny -= .register_cost; announce "The party ["+ strcharinfo(1) +"] has started the MvP ladder game.", bc_all; set .party_id, getcharid(1); set .@time_enter, gettimetick(2); ~ afeter Zeny -= .register_cost; announce "The party ["+ strcharinfo(1) +"] has started the MvP ladder game.", bc_all; set .party_id, getcharid(1); set .@time_enter, gettimetick(2); set .@cooldown,60; //time in minute ~4 before announce "You have "+ .timeout +" minutes to complete "+ .totalround +" rounds.", bc_self; .@name$[.@c] = strcharinfo(0); .@c++; ~ afeter announce "You have "+ .timeout +" minutes to complete "+ .totalround +" rounds.", bc_self; .@name$[.@c] = strcharinfo(0); RoomCD = gettimetick(2)+(60*.@cooldown); .@c++;
-
I would like to know how I change the calculation to be based on atk / matk (50%) + weapon atk
currently (RE) this effect only calculates the weapon's atk, as hydra and turtle general.
thank anyone who can help me
-
é só abrir ele com um editor de texto, geralmente todas as pasta data base que tem pra montar cliente vem com eles .lub mas não ta convertida está com o seu conteúdo em texto normal.
-
does the RDMOPT_VAR_ATKPERCENT formula work that way?
https://streamable.com/egie8Obs:
100 of RDMOPT_VAR_ATTPOWER is doubling atkpower. -
2 hours ago, IsabelaFernandez said:
for me fixed casting time has always had a problem, I can't increase the time of any skill, just reduce it.
it's weird, it's ignoring the fixed 2 seconds of casttime, rumors say this has been around since eAthena.
-
8 hours ago, Emistry said:
I didn't change it, it's standard '-'
-
error print ?
-
- Id: 401 Name: CH_SOULCOLLECT Description: Zen MaxLevel: 1 TargetType: Self DamageFlags: NoDamage: true Hit: Single HitCount: 1 CastCancel: true Duration1: 600000 FixedCastTime: 2000 Requires: SpCost: 20
fixedcasttime 2sec '-'
-
alter: getmapxy .map$,.x,.y,1;
for: getmapxy .map$,.x,.y,BL_NPC;
please show error image.
-
\data\luafiles514\lua files\signboardlist.lub
look for where and map
- 1
-
I was using this mod from the normal goddameit on windows (vs), but when I tried to compile in linux he accused the lack of a windows library: WINSOCK2.H
would it be possible to convert the ping.c code for linux centos and maintain the same functionality?
ping.c
#ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif #include <WINSOCK2.H> #define DEF_BUF_SIZE 1024 #define IP_HEADER_SIZE 20 #define ICMP_HEADER_SIZE 12 typedef struct _ICMP_HEADER { BYTE bType; BYTE bCode; USHORT nCheckSum; USHORT nId; USHORT nSequence; UINT nTimeStamp; }ICMP_HEADER, *PICMP_HEADER; USHORT GetCheckSum(LPBYTE lpBuff, DWORD dwSize) { DWORD dwCheckSum = 0; USHORT* lpWord = (USHORT*)lpBuff; while(dwSize > 1) { dwCheckSum += *lpWord++; dwSize -= 2; } if(dwSize ==1) dwCheckSum += *((LPBYTE)lpBuff); dwCheckSum = (dwCheckSum >> 16) + (dwCheckSum & 0XFFFF); return (USHORT)(~dwCheckSum); } BOOL Ping(char* lpDestIP, int *nRet_, int *nTime_) { int nTime = 0; int ret = 0; char ICMPPack[ICMP_HEADER_SIZE] = {0}; char szRcvBuff[DEF_BUF_SIZE] = {0}; int i = 0; int nRet = 0; int nLen = 0; int nError = 0; SOCKET s; PICMP_HEADER pRcvHeader; SOCKADDR_IN SourceSockAddr; SOCKADDR_IN DestSockAddr; PICMP_HEADER pICMPHeader; DestSockAddr.sin_family = AF_INET; DestSockAddr.sin_addr.S_un.S_addr = inet_addr(lpDestIP); DestSockAddr.sin_port = htons(0); pICMPHeader = (PICMP_HEADER)ICMPPack; pICMPHeader->bType = 8; pICMPHeader->bCode = 0; pICMPHeader->nId = (USHORT)GetCurrentProcessId(); pICMPHeader->nCheckSum = 0; pICMPHeader->nTimeStamp = 0; s = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); nTime = 1000; ret = setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, (char*)&nTime, sizeof(nTime)); for(i=0; i <1; i++) { pICMPHeader->nCheckSum = 0; pICMPHeader->nSequence = i; pICMPHeader->nTimeStamp = GetTickCount(); pICMPHeader->nCheckSum = GetCheckSum((LPBYTE)(ICMPPack), ICMP_HEADER_SIZE); nRet = sendto(s, ICMPPack, ICMP_HEADER_SIZE, 0, (SOCKADDR*)&DestSockAddr, sizeof(DestSockAddr)); if(nRet == SOCKET_ERROR) { return FALSE; } nLen = sizeof(SOCKADDR_IN); if(nRet == SOCKET_ERROR) { return FALSE; } nRet = recvfrom(s, szRcvBuff,DEF_BUF_SIZE,0,(SOCKADDR*)&SourceSockAddr,&nLen); if(nRet == SOCKET_ERROR) { return FALSE; } pRcvHeader = (PICMP_HEADER)(szRcvBuff + IP_HEADER_SIZE); nTime = GetTickCount() - pRcvHeader->nTimeStamp; //printf("Return Message: %s bytes=%d time=%dms\n", inet_ntoa(SourceSockAddr.sin_addr), nRet, nTime); *nRet_ = nRet; *nTime_ = nTime; } return TRUE; }
-
20 minutes ago, Surefirer said:
Hello, I have a custom instance, when the player disconnect or logout the game, when they log in again, I want the character back to the instance map, so they can continue enjoy the game, however it only allow re-enter the instance map once. hope you understand, if not I will try explain more detail.
in this case warp will not work since it is an instance, it would have to be instance_enter, or am i mistaken?
I will make a model and send it here... -
here's normal [ r16311 ]
prontera,155,191,5 script teste22 112,{ mes "guild name: "+getguildname(getcharid(2))+""; mes "guild name: "+getguildname(1)+""; close; }
@Edit:
I did another test and the result was abnormal!- 1
-
I didn't understand what you want to do, you cannot warp a player in logout, if can explain more clearly what you want, I can try to do.
-
thank you all, I believed it was in conf \ battle \ cliente.conf
-
I didn't find where to disable ;/
-
need to change also in: db\(re/pre-re)\job_exp.txt
-
a doubt, is the critic based on luk stats?
-
There are a lot of errors regarding the use of the variables of how you are using it!
I recommend that you make a request for someone to make in script request. -
solved by downloading revision 16311 https://github.com/rathena/rathena/commit/390eb9772ad001c48e4ebbb06969b4a0b885b21d
-
VS 2017
rathena-master[r16310]\src\map\status.hpp(1156): error C2466: cannot allocate an array of constant size 0
would anyone know why this is happening?
Get value from a char variable
in Source Support
Posted
Thank you very much, it worked just fine