Active Member Exygo 1097 Posted December 12, 2014 Active Member Share Posted December 12, 2014 Hi i'm trying to finish my VIP-TICKET system and i've already finished, the last thing what i need to do is to make a quest when login and pc.get_name() like [VIP] to give a letter? how can i do this? anyone has an idea ? https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
lolor2 73 Posted December 12, 2014 Share Posted December 12, 2014 when login with string.match(pc.get_name(),"[VIP]") begin 1 Link to comment Share on other sites More sharing options...
Active Member Exygo 1097 Posted December 12, 2014 Author Active Member Share Posted December 12, 2014 when login with string.match(pc.get_name(),"[VIP]") begin Thank you very much for the fast reply i will try that Metin2dev the best https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
lolor2 73 Posted December 12, 2014 Share Posted December 12, 2014 u should proably google next time about lua xD Link to comment Share on other sites More sharing options...
Active Member Exygo 1097 Posted December 12, 2014 Author Active Member Share Posted December 12, 2014 u should proably google next time about lua xD And if I don't have string.match function ? https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19751 Posted December 12, 2014 Honorable Member Share Posted December 12, 2014 string.match is a built-in function in lua, so that is impossible Link to comment Share on other sites More sharing options...
Active Member Exygo 1097 Posted December 12, 2014 Author Active Member Share Posted December 12, 2014 SYSERR: Dec 12 20:39:54 :: RunState: LUA_ERROR: [string "stash"]:2: attempt to call field `match' (a nil value) SYSERR: Dec 12 20:39:54 :: GetQuestStateName: QUEST wrong quest state file stash.0 https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
lolor2 73 Posted December 12, 2014 Share Posted December 12, 2014 (edited) use string.find then ... string.find(pc.get_name(),"[VIP]") != nil which should definitly work because of: https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member Exygo 1097 Posted December 12, 2014 Author Active Member Share Posted December 12, 2014 (edited) use string.find then ... string.find(pc.get_name(),"[VIP]") ~=/!= "" which should definitly work because of: https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif That worked, again thank you so much! The thread can be closed# Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
Active Member Exygo 1097 Posted December 13, 2014 Author Active Member Share Posted December 13, 2014 There is a problem.. i finished all my quests but when players login into the game some of them got VIP without being VIP :| so the function is history X_X https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
Developer PACI 928 Posted December 14, 2014 Developer Share Posted December 14, 2014 With: when login with string.find(pc.get_name(), "%[VIP%]") begin should work fine. 'Cause some functions don't read some special characters (like [] ) 1 when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
Benhero 23 Posted December 16, 2014 Share Posted December 16, 2014 Jep. All Quest Commands don't read the [ ] Chrakters. You have to edit the source to Change it Or insert a new row in the account table with name "isVip" and use a ENUM as selection or Boolean. (1/0 - True/false) Greatz Link to comment Share on other sites More sharing options...
Active Member Exygo 1097 Posted December 17, 2014 Author Active Member Share Posted December 17, 2014 With: when login with string.find(pc.get_name(), "%[VIP%]") begin should work fine. 'Cause some functions don't read some special characters (like [] ) PACI helped me and that worked. https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now