Lore Conditions

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Standfford

Member
Apr 25, 2017
11
0
1
Hello,

I need one item with name of lore is (bye) send (you can't repair this item).

options:
takemoneyforarepair: 5000

command /popo:
permission: repair.repair
trigger:
if name of tool of player is "hello" with lore "bye":
send "you can't repair this item"
else:
repair tool of player
remove {@takemoneyforarepair} from player's balance
send "&3You repair own tool succesfully! You paid {@takemoneyforarepair} dollars!"
 
W
Hello,

I need one item with name of lore is (bye) send (you can't repair this item).

options:
takemoneyforarepair: 5000

command /popo:
permission: repair.repair
trigger:
if name of tool of player is "hello" with lore "bye":
send "you can't repair this item"
else:
repair tool of player
remove {@takemoneyforarepair} from player's balance
send "&3You repair own tool succesfully! You paid {@takemoneyforarepair} dollars!"
Whats the error?
 
This code have errors, and don't run when i delete ( with lore "bye") the skript run good with any errors. But i need this part.
 
Hello,

I need one item with name of lore is (bye) send (you can't repair this item).

options:
takemoneyforarepair: 5000

command /popo:
permission: repair.repair
trigger:
if name of tool of player is "hello" with lore "bye":
send "you can't repair this item"
else:
repair tool of player
remove {@takemoneyforarepair} from player's balance
send "&3You repair own tool succesfully! You paid {@takemoneyforarepair} dollars!"
Just try this one:
code_language.skript:
If name of player's tool is "text":
    If lore of player's tool contains " text":
        #do stuff
 
Just try this one:
code_language.skript:
If name of player's tool is "text":
    If lore of player's tool contains " text":
        #do stuff

This cfg don't check lore and name, any time accept repair item.
[doublepost=1493157009,1493153125][/doublepost]This is my next code... Now i need check all line ores not only line 1 and check the item is damaged.

code_language.skript:
options:
    takemoneyforarepair: 5000
 
command /popo:
    trigger:
        if line 1 of lore of player's tool contains "name1":
            send "can't repair"
        if player's balance is less than 5000:
            send "no money"
        else:
            repair tool of player
            remove {@takemoneyforarepair} from player's balance
            send "{@takemoneyforarepair}"

Thanks
 
lore of player's tool contains "text" works flawlessly.


So your code will end up like this:

code_language.skript:
options:
    takemoneyforarepair: 5000

command /popo:
    trigger:
        data value of player's tool is 0:
            send "not damaged, no need to repair"
            stop
        lore of player's tool contains "name1":
            send "can't repair"
            stop
        player's balance is less than 5000:
            send "no money"
            stop
        else:
            repair tool of player
            remove {@takemoneyforarepair} from player's balance
            send "{@takemoneyforarepair}"
 
Last edited by a moderator:
lore of player's tool contains "text" works flawlessly.


So your code will end up like this:

code_language.skript:
options:
    takemoneyforarepair: 5000

command /popo:
    trigger:
        data value of player's tool is 0:
            send "not damaged, no need to repair"
            stop
        lore of player's tool contains "name1":
            send "can't repair"
            stop
        player's balance is less than 5000:
            send "no money"
            stop
        else:
            repair tool of player
            remove {@takemoneyforarepair} from player's balance
            send "{@takemoneyforarepair}"

With this code no check lore and repair item

http://prntscr.com/f0tv2k

Only check money

http://prntscr.com/f0tw2k
 
Then i have no idea what's happening. Sorry I can't be of more help. As I said, it works perfectly on my side.
 
Status
Not open for further replies.