Jump to content
  • 0

NPC Waiting Room


Yudax

Question


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  248
  • Reputation:   7
  • Joined:  11/27/12
  • Last Seen:  

Hello, I have an npc with this script on a single .txt

//===== rAthena Script =======================================
//= Shop Street
//===== By: ==================================================
//= Masao
//===== Current Version: =====================================
//= 1.0 [Masao]
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= A Shopstreet in quiz_02 where players can buy some Equipment.
//============================================================
Crystilia,61,68,5	script	Mall Warper	837,{
OnInit:
warp "quiz_02",337,73;
waitingroom "Mall Warper",0;
end;

}

quiz_02,337,69,5	script	Mall Exit	837,{
OnInit:
warp "Crystilia",70,71;
waitingroom "Exit",0;
end;

}

quiz_02,326,85,5	shop	Armor	99,2304:10000,2306:20000,2308:20000,2310:50000,2311:50000,2313:50000,2315:75000,2317:100000,2322:20000,2326:60000,2331:75000,2342:100000,2353:75000,2364:150000,2367:100000,2399:50000
quiz_02,326,82,5	shop	Shield	99,2102:10000,2106:60000,2108:60000,2110:85000,2114:30000,2116:30000,2123:50000,2124:50000
quiz_02,322,81,5	shop	Footgear	99,2404:10000,2406:20000,2409:30000,2412:50000,2417:50000,2418:50000,2424:50000,2425:20000
quiz_02,322,78,5	shop	Mace	99,1502:10000,1505:20000,1511:20000,1514:-1,1517:-1,1520:50000,1522:100000,1523:25000,1528:50000,1529:50000,1531:50000
quiz_02,322,75,5	shop	Knuckle	494,1802:20000,1804:50000,1806:60000,1808:75000,1810:70000,1812:60000,1813:100000,1814:100000,1822:150000
quiz_02,322,72,5	shop	Whips	494,1951:10000,1953:20000,1955:30000,1962:20000,1963:50000,1972:10000,1974:10000,1976:50000
quiz_02,322,69,5	shop	Instruments	494,1902:10000,1904:20000,1906:-1,1908:50000,1913:50000,1914:50000,1915:50000,1916:50000,1917:50000
quiz_02,322,66,5	shop	Books	494,1550:30000,1551:60000,1552:51000,1559:25000,1561:75000,1564:25000,1568:70000,1569:70000,1570:70000,1571:70000,1572:50000
quiz_02,325,64,5	shop	Guns	497,13103:60000,13105:100000,13106:200000,13101:10000,13150:6000,13152:30000,13153:50000,13155:60000,13156:100000,13154:30000,13159:250000,13157:150000,13161:300000,13162:500000
quiz_02,328,62,5	shop	Fuuma Shuriken	497,7522:500,7521:500,7523:500
quiz_02,331,62,5	shop	One-Handed Swords	497,1108:10000,1117:10000,1120:100000,1124:50000,1130:100000,1131:50000,1133:50000,1138:200000,1139:200000,1145:-1,1149:50000
quiz_02,334,62,5	shop	Two-Handed Swords	497,1155:50000,1158:90000,1163:120000,1164:50000,1165:50000,1166:75000,1168:50000,1169:500000,1172:200000,1175:75000
quiz_02,337,62,5	shop	Spears	731,1405:20000,1408:50000,1415:100000,1417:75000,1421:75000,1422:25000
quiz_02,340,62,1	shop	Dagger	731,1208:20000,1211:20000,1217:20000,1223:50000,1231:75000,1235:75000,1236:75000,1237:75000
quiz_02,343,62,4	shop	Axes	731,1302:10000,1306:20000,1307:45000,1309:75000,1352:20000,1355:30000,1358:75000,1363:50000,1364:50000,1365:50000,1366:50000,1371:100000
quiz_02,346,62,4	shop	Accessories	731,2621:-1,2622:-1,2624:30000,2618:10000,2625:30000,2626:30000,2674:10000,2648:50000,2649:50000,2627:-1,2701:75000
quiz_02,349,64,4	shop	Bows	731,1702:20000,1705:50000,1708:20000,1720:50000,1723:75000,1724:75000,1725:75000
quiz_02,353,66,4	shop	Staffs / Rods	731,1602:20000,1605:20000,1608:20000,1611:45000,1618:85000,1620:85000,1622:50000,1624:50000,1625:50000,1626:50000
quiz_02,353,68,4	shop	Garments	405,2504:10000,2506:40000,2507:82000,2508:56000,2514:50000,2518:60000,2519:60000,2528:85000,2531:10000,2553:10000
quiz_02,353,70,4	shop	Katars	405,1251:50000,1253:100000,1255:75000,1261:125000,1262:20000,1263:20000,1265:100000,1275:100000,1276:100000,1277:100000,1278:100000
quiz_02,353,72,4	shop	Lower Headgear	405,2218:10000,2267:5000,5107:100000,2265:5000,2266:50000,2269:50000,2270:50000
quiz_02,353,74,4	shop	Middle Headgear	405,2201:5000,2203:4000,2205:3500,2212:5000,2225:10000,2229:50000,2231:50000,2234:50000,2235:50000,2281:25000,2292:50000,2296:50000
quiz_02,353,76,4	shop	Upper Headgear	405,2210:1000,2211:1000,2213:10000,2214:20000,2217:10000,2221:5000,2223:10000,2246:75000,2256:75000,2264:100000,2280:20000,2299:30000
quiz_02,353,78,4	shop	Ammunition	880,1766:50,1755:20,1750:10,1754:20,1761:20,1752:20,1760:20,1759:20,1772:100,1757:30,1770:20,1769:30,1765:40,1763:30,1762:30,1767:30,1764:30,1751:20,1768:30,1753:30,1756:30,1758:30,1771:1000,13200:50,13202:100,13201:300,13206:500,13203:500,13207:500,13204:500,13205:500,13252:50,13254:500,13251:100,13253:300,13250:50,13256:50,13259:50,13258:50,13255:50,13257:50
quiz_02,349,85,4	shop	Alchemist Dealer	880,715:600,716:600,717:600,1025:200,7136:500,7135:500,7136:500,7137:500,7138:500,7139:6000
quiz_02,351,82,4	shop	Tool Dealer	807,678:200000,607:100000,611:700,601:200,717:500,716:500,715:500,506:40,610:4000,545:150,546:600,547:1650,7142:75000,7433:50000,561:50000,656:30000,645:15000,657:30000,1065:12000,2242:100000
quiz_02,349,83,4	shop	Sheepy Gonzales	895,12028:1000,12262:500,12016:750
//quiz_02,73,136,4	shop	Headgear 01	832,5380:40000,5382:40000,2269:5000,2270:5000,5107:15000,5110:15000,2247:30000:5206:10000,2245:30000,2286:35000,2296:15000,2258:45000,5161:200000,5104:40000,2295:20000,5026:30000,5032:100000,5038:30000,5229:65000,5227:65000,5228:65000,5198:50000,5058:300000,5253:80000,5252:60000,5296:100000,5231:300000,5232:300000,5233:300000,5230:300000,5234:300000,5076:50000
//quiz_02,71,134,4	shop	Headgear 02	832,5059:100000,5235:75000,5236:75000,5237:75000,5293:150000,5303:35000,5304:65000,5312:65000,5315:45000,5317:45000,5319:75000,5320:120000,5323:588888,5336:50000,5337:50000,5338:50000,5339:50000,5346:50000
//quiz_02,69,132,4	shop	Headgear 03	832,5181:300000,5102:500000,5016:75000,5349:150000,5013:700000,5022:500000,5171:1250000,5135:500000,5029:50000,5033:65000,5040:100000,5047:35000,5065:65000,5068:50000,5074:50000,5084:75000,5086:150000,5108:350000,5121:100000,5133:50000,5137:100000,5138:150000,5140:55000,5146:75000,5151:75000,5152:150000,5170:150000,5173:75000,5174:75000,5175:75000,5184:50000,5185:45000,5187:75000,5188:50000,5191:25000,5192:25000,5193:25000,5194:25000,5195:25000,5196:25000,5197:25000
//quiz_02,69,128,4	shop	Headgear 04	832,5200:75000,5205:100000,5211:75000,5226:50000,5238:75000,5239:75000,5240:75000,5241:75000,5242:75000,5243:50000,5325:75000,5254:100000,5255:65000,5257:50000,5297:100000,2202:45000,5258:35000,5298:50000,5276:50000,5273:50000,5275:50000,5274:50000,5259:50000,5271:250000,5272:50000,5284:50000,5286:75000,5288:50000,5289:50000,5291:55000,5292:55000,5294:55000,5352:50000,5324:100000,5359:50000,5360:50000
//quiz_02,72,125,4	shop	Headgear 05	832,5340:50000,5341:50000,5342:50000,5343:50000,5344:50000,5345:50000,5354:50000,5355:50000,5361:65000,5365:50000,5373:75000,5379:50000,5383:60000,5384:88888,5390:88888,5388:50000,5411:50000,5393:75000,5397:35000,5399:50000,5800:175000,5801:300000,5802:150000


Everytime I click on the NPC, the mapserver has an error:

[Error]: chat_createnpcchat: npc 'Mall Warper' already has a chatroom, cannot cr
eate new one!
[Error]: chat_createnpcchat: npc 'Mall Exit' already has a chatroom, cannot crea
te new one!

How to solve this one?

Thank you :)

---

SOLVED! By adding

OnInit:
delwaitingroom;
waitingroom "Exit",0;
end;

Edited by Mysterious
Please use [codebox] for content longer than 10 lines.
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

quiz_02,337,69,5	script	Mall Exit	837,{
warp "Crystilia",70,71;
end;
OnInit:
waitingroom "Exit",0;
end;
}

is better (I think) since this waitingroom is not dynamic

Edited by Capuche
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  248
  • Reputation:   7
  • Joined:  11/27/12
  • Last Seen:  

quiz_02,337,69,5	script	Mall Exit	837,{
warp "Crystilia",70,71;
end;
OnInit:
waitingroom "Exit",0;
end;
}

is better (I think) since this waitingroom is not dynamic

Thanks, anyway whats the difference between the two? The dynamic and the non-dynamic?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Thanks, anyway whats the difference between the two? The dynamic and the non-dynamic?

Non-dynamic :

// The NPC will just show a box above its head that says "Hello World", clicking

// it will do nothing, since the limit is zero.

waitingroom "Hello World",0;

It will do nothing so you don't need to refresh/delete/recreate it

source : script_commands.txt

A little more dynamic :

prontera,150,160,5    script    hyuhgfikol    456,{

   initnpctimer;
   end;

OnTimer20:
   do {
    delwaitingroom strnpcinfo(0);
//-- Time - per seconds
    waitingroom "Time = "+gettime(1), 0;
    .@XX++;
    sleep 995;
   }
   while ( .@XX < 10 );
   stopnpctimer;
   delwaitingroom strnpcinfo(0);
   end;
}

Create a chatroom which display the time (seconds) between 10 seconds

Edited by Capuche
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...