Forum

> > CS2D > Scripts > How to make Tibia NPC with level requirement?
Forums overviewCS2D overview Scripts overviewLog in to reply

English How to make Tibia NPC with level requirement?

5 replies
To the start Previous 1 Next To the start

old Re: How to make Tibia NPC with level requirement?

Rainoth
Moderator Off Offline

Quote
Horrible description of the problem. Horrible title.
Try again. Please, write the title and description properly or otherwise, we won't be able to help you.

From your manner of speech I can guess that you wanted to say something like this:

"Good day, my fellow unrealsoftware.de users,

Today I am writing to inquire whether it is possible to create a level limited NPC in a script called "Tibia RPG". I want to make it in a way so only people of level 20 or above could interact with the NPC so he could let the players pass through the gate. Is such a thing possible and if so - how?

Thank you for your answers,
user Gaibro"

Now it's up to others to help you out on this. I don't want to see what you wrote again because it looks like thoughts written in a language then translated 20 times and the result posted here.

old Re: How to make Tibia NPC with level requirement?

Ryden
User Off Offline

Quote
I think that i understood what you wanted to know.

If you want: An NPC who let enter in the other Area only Level 20 players Or more if this is it :

1
[19] = {"Demon Guard [LvL 20]", pos={6323, 5714}, rot=270, image="npc3"},

I think where to put that line if you don't know tell me and after this go down and past this code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
NPCs[19].func = function(npc, id, words, state)
     if words == "hi" then
          NPCspeak(npc, "You want cross the bridge ?")
          NPCspeak(npc, "You also have to be at least level 20.")
          PLAYERS[id].tmp.npcstate = {npc, 1}
     elseif contains(words, "bye") then
          NPCspeak(npc, "Not crossing?")
          PLAYERS[id].tmp.npcstate = nil
     elseif state == 1 then
          if contains(words, "yes") then
               if PLAYERS[id].Level < 20 then
                         parse("setpos " .. id .. " 2288 352")
                    else
                    NPCspeak(npc, "Your level isn't high enough!")
               end
          elseif contains(words, "no") then
               NPCspeak(npc, "Not crossing?")
               PLAYERS[id].tmp.npcstate = nil
          end
     end
end


Don't forgot to change NPC's position and to set the arrival position !
And if you got problems please let me know,

-Thanks

@user Rainoth: Don't critic his english he is a guys who is learning english like a lot of players of cs2d and here he really needed help but i knew that he tryed as possible to talk well but you as a guys who know english try to help him,

I was like him but now i learned talking , i know that my english isn't well but other players can understand me,

Well, I think you understood

-Thanks
edited 2×, last 25.02.15 12:27:39 am

old Re: How to make Tibia NPC with level requirement?

Rainoth
Moderator Off Offline

Quote
@user Ryden: I have full rights to critic his English. I'd understand if it was below average like yours, however it's bad to the point that it makes people wonder what he wanted to say. If it's so bad, he shouldn't use translators and find a person who can write in understandable English. Also, I rewrote what he wanted so others would understand, how is that criticism?
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview