The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gift per IP
Author Message
tyllneas
Apprentice
*

Posts: 8
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Nov 2012
Reputation: 0



Post: #1
Gift per IP
Hello! I have a question where there is a mistake
I need to give new player's a gift Per IP addres ! Help plzz
Quote:[ITEMDEF i_gift_stone]
ID=i_gravestone_17
TYPE=T_Script
NAME=Gift Stone

ON=@CREATE
COLOR=04ad
ATTR=010

ON=@CLICK
MESSAGE @042b <name>
message @0444 Total gifs receive: <eval <tag0.giftsgive>>
RETURN 1

ON=@DCLICK
IF (<distance> > 6)
SRC.SYSMESSAGE You're too far from <name>.
RETURN 1
ELSE
SDIALOG d_gift_stone
RETURN 1
ENDIF

[DIALOG d_gift_stone]
330,200
resizepic 0 0 3600 320 200
dtext 90 22 07a3 Gift's for free!
dtext 40 57 1152 PvP Disabled - 14 days!
dtext 40 77 1152 Prof Account - 14 days!
dtext 40 97 1152 200.000 gp!
dtext 40 117 52 5 Lvl with max skills!
dtext 50 147 57 Take the gift!
dtext 170 165 80 Only 1 gift per ip!

button 30 150 1209 1210 1 0 1

[DIALOG d_gift_stone BUTTON]
ON=1
IF (<distance> > 6)
SRC.SYSMESSAGE You're too far from <name>.
RETURN 1
ENDIF

FOR 1 <eval <tag0.giftplayers>>
IF (<tag0.giftplayer_lastip_<eval <local._for>>> == <SRC.ACCOUNT.LASTIP>) && (<SRC.ACCOUNT.LASTIP> != 10.10.10.1)
SRC.SYSMESSAGE @50 Your IP already take the gift.
RETURN 1
ENDIF
END
IF (<SRC.ISPLAYER>)
IF (<SRC.ISMAGE>)
src.tag0.giftplayer_lastip_<eval <tag0.players>> = <src.account.lastip>
src.tag0.giftplayers
SRC.skillclass Class_mage5
SRC.rskill_mage 1500,1500,1500,1000,1500,1500,1500,1500,1000,1000
SRC.tag0.level 5
SRC.title Level 5 Mage
SRC.tag.perenos 1
SERV.NEWITEM I_MONEY_DEED
NEW.TAG.AM = 200000
NEW.MORE1 = 200000
NEW.CONT = <SRC.FINDLAYER.21.UID>
SRC.SYSMESSAGE @042b You successfully receive the gift. To obtain the necessary parameters enter: ".fixstatus".
SRC.tag.msgsend = <serv.name>
SRC.events +e_message
ELIF (<SRC.ISARCHER>)
src.tag0.giftplayer_lastip_<eval <tag0.players>> = <src.account.lastip>
src.tag0.giftplayers
SRC.skillclass Class_archer5
SRC.rskill_archer 1500,1500,1500,1500,1000,1500,1500,1500,1500,1500
SRC.tag0.level 5
SRC.title Level 5 Archer
SRC.tag.perenos 1
SERV.NEWITEM I_MONEY_DEED
NEW.TAG.AM = 200000
NEW.MORE1 = 200000
NEW.CONT = <SRC.FINDLAYER.21.UID>
SRC.SYSMESSAGE @042b You successfully receive the gift. To obtain the necessary parameters enter: ".fixstatus".
SRC.tag.msgsend = <serv.name>
SRC.events +e_message
ELIF (<SRC.ISWARIOR>)
src.tag0.giftplayer_lastip_<eval <tag0.players>> = <src.account.lastip>
src.tag0.giftplayers
SRC.skillclass Class_warior5
SRC.rskill_warrior 1500,1500,1500,1000,1500,1500,1500,1500,1500,1500
SRC.tag0.level 5
SRC.title Level 5 Warrior
SRC.tag.perenos 1
SERV.NEWITEM I_MONEY_DEED
NEW.TAG.AM = 200000
NEW.MORE1 = 200000
NEW.CONT = <SRC.FINDLAYER.21.UID>
SRC.SYSMESSAGE @042b You successfully receive the gift. To obtain the necessary parameters enter: ".fixstatus".
SRC.tag.msgsend = <serv.name>
SRC.events +e_message
ELIF (<SRC.ISCLERIK>)
src.tag0.giftplayer_lastip_<eval <tag0.players>> = <src.account.lastip>
src.tag0.giftplayers
SRC.skillclass Class_clerik5
SRC.rskill_clerik 1500,1500,1500,1500,1500,1000,1000,1500,1500,1500
SRC.tag0.level 5
SRC.title Level 5 Cleric
SRC.tag.perenos 1
SERV.NEWITEM I_MONEY_DEED
NEW.TAG.AM = 200000
NEW.MORE1 = 200000
NEW.CONT = <SRC.FINDLAYER.21.UID>
SRC.SYSMESSAGE @042b You successfully receive the gift. To obtain the necessary parameters enter: ".fixstatus".
SRC.tag.msgsend = <serv.name>
SRC.events +e_message
ELSE
SYSMESSAGE @50 You already receive gift!
ENDIF
ELSE
SYSMESSAGE @50 Only for players!
ENDIF
tag0.giftsgive +=1

IF !(<src.findid.i_nonpvp_timer>)
SERV.NEWITEM I_NONPVP_TIMER
NEW.CONT = <SRC.UID>
NEW.TIMER = <EVAL((3600*24*14*9)/10)>
ELSE
SRC.FINDID.I_NONPVP_TIMER.TIMER = <EVAL <FINDID.I_NONPVP_TIMER.TIMER>+((3600*24*14*9)/10)>
ENDIF

if (<src.findid.i_prof_timer>)
src.findid.i_prof_timer.timer = <src.findid.i_prof_timer.timer> + (<EVAL((3600*24*14*9)/10)>)
src.sysmessage @50 Command: .prof - total professional account days.
src.sysmessage @50 Command: .powerhour - power hour (enable/disable).
src.sysmessage @50 Command: .pvptime - total nonpvp account hours.
src.sysmessage @50 Command: .pvp - on/off nonpvp mode!
custs profacc_<eval <tag0.bitemdel>>
var.prof=
return 1
endif
src.NEWITEM I_PROF_TIMER
src.EQUIP <NEW.UID>
NEW.TIMER=<EVAL((3600*24*14*9)/10)>
SERV.NEWITEM I_REGEN_BONUS
src.EQUIP <NEW.UID>
NEW.TIMER=1
src.sysmessage @50 Command: .prof - total professional account days.
src.sysmessage @50 Command: .powerhour - power hour (enable/disable).
src.sysmessage @50 Command: .pvptime - total nonpvp account hours.
src.sysmessage @50 Command: .pvp - on/off nonpvp mode!
custs profacc_<eval <tag0.bitemdel>>
var.prof=
RETURN 1
(This post was last modified: 11-03-2012 02:24 AM by tyllneas.)
11-02-2012 08:56 AM
Find all posts by this user Like Post Quote this message in a reply
ShiryuX
Journeyman
*

Posts: 249
Likes Given: 1
Likes Received: 19 in 14 posts
Joined: Mar 2010
Reputation: 4



Post: #2
RE: Plss HELP
You should name your topic "Gift per IP" and not "PLSSS HELP!!!", be descriptive with the title.
11-03-2012 01:22 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Barnabus
Journeyman
*

Posts: 124
Likes Given: 0
Likes Received: 3 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #3
RE: Plss HELP
Code is so hard to read without indentation.......

At a Glance ::
That FOR Loop has no ENDFOR

Code:
FOR
    // Everything to be looped
ENDFOR
11-03-2012 02:10 AM
Find all posts by this user Like Post Quote this message in a reply
tyllneas
Apprentice
*

Posts: 8
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Nov 2012
Reputation: 0



Post: #4
RE: Plss HELP
Its all OKE all FIxed !
11-03-2012 02:24 AM
Find all posts by this user Like Post Quote this message in a reply
ShiryuX
Journeyman
*

Posts: 249
Likes Given: 1
Likes Received: 19 in 14 posts
Joined: Mar 2010
Reputation: 4



Post: #5
RE: Plss HELP
(11-03-2012 02:10 AM)Barnabus Wrote:  Code is so hard to read without indentation.......

At a Glance ::
That FOR Loop has no ENDFOR

Code:
FOR
    // Everything to be looped
ENDFOR

He used END, is the same as ENDFOR.
11-03-2012 04:04 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Barnabus
Journeyman
*

Posts: 124
Likes Given: 0
Likes Received: 3 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #6
RE: Plss HELP
exactly!
11-03-2012 06:59 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)