Örnek;
[function test]
doswitch <dargn>
return "test mesajı 0"
return "test mesajı 1"
return "test mesajı 2"
enddo
mesela oyun içinde .test 1 yazarsak "test mesajı 1" ifadesini bize döndürür.
Başka bir örnek bu örnek alıntıdır.
DOSWITCH <src.account.plevel>
begin
src.tag.name.prefix=
src.tag.name.suffix=" [Guest]"
end
begin
src.tag.name.prefix=
src.tag.name.suffix=
end
begin
src.tag.name.prefix="Counselor "
src.tag.name.suffix=" [Staff]"
tag.name.hue=079a
end
begin
src.tag.name.prefix="Seer "
src.tag.name.suffix=" [Staff]"
tag.name.hue=079a
end
begin
src.tag.name.prefix="GM "
src.tag.name.suffix=" [Staff]"
tag.name.hue=079a
end
begin
src.tag.name.prefix="Dev "
src.tag.name.suffix=" [Staff]"
src.tag.name.suffix=
tag.name.hue=079a
end
begin
src.tag.name.prefix="Admin "
src.tag.name.suffix=" [Staff]"
tag.name.hue=079a
end
begin
src.tag.name.prefix="Admin "
src.tag.name.suffix=" [Owner]"
tag.name.hue=079a
end
ENDDO
bu örnekte ise doswitch account plevel değerinde dönecektir ve döngü bir sürü if sorgusundan kurtulacak eğer if ile yapacak olsaydık.
if (<account.plevel> == 0)
message title yazdir
elseif (<account.plevel> == 1)
message title yazdir
...
...
...
elseif (<account.plevel> == 7)
message title yazdir
endif
şeklinde uzayan giden if ifadeleri ile dolacaktı. 


